RLQ analysis

Prepare data

When preparing palm traits for analysis, I had to remove several variables that contained NAs for our palm species. Also, I removed the descriptive traits about the fruit, and the variable “FruitShape” because it has blank values.

Run RLQ analysis and plot data

To successfully run this, I had to remove Habitat type from our environmental variables. The problem might be the naming convention. Sarah, can you make three letter codes for these?

That’s unreadable, plotting as seperate.

Summary of RLQ analysis. How to interpret this?

## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = acpR.aravo, dudiL = afcL.aravo, dudiQ = acpQ.aravo, 
##     scannf = FALSE)
## 
## Total inertia: 0.657
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 0.300155 0.228303 0.083533 0.041707 0.001744 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
## 45.6877 34.7508 12.7148  6.3484  0.2654 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   45.69   80.44   93.15   99.50   99.77 
## 
## (Only 5 dimensions (out of 9) are shown)
## 
## 
## Eigenvalues decomposition:
##         eig     covar      sdR      sdQ      corr
## 1 0.3001551 0.5478641 1.034229 1.481707 0.3575146
## 2 0.2283026 0.4778102 1.084627 2.004471 0.2197734
## 
## Inertia & coinertia R (acpR.aravo):
##     inertia      max     ratio
## 1  1.069629 1.755539 0.6092881
## 12 2.246045 3.085130 0.7280229
## 
## Inertia & coinertia Q (acpQ.aravo):
##     inertia      max     ratio
## 1  2.195457 5.095305 0.4308784
## 12 6.213361 7.950625 0.7814933
## 
## Correlation L (afcL.aravo):
##        corr       max     ratio
## 1 0.3575146 0.9327084 0.3833080
## 2 0.2197734 0.8335977 0.2636445

Fourth-corner analysis

From tutorial: “Fourth-corner analysis can be used to test the associations between individual traits and environmental variables. To obtain a test with a correct type I error, results of model 2 (permutation of sites, i.e. rows) and 4 (permutation of species, i.e. columns) should be combined.”

 nrepet <- 999
 four.comb.aravo <- fourthcorner(p_env[,-10], p_species,
     p_traits, modeltype = 6, p.adjust.method.G = "none",
     p.adjust.method.D = "none", nrepet = nrepet)

Plotting the data: “Blue cells correspond to negative significant relationships while red cells correspond to positive significant relationships (this can be modified using the argument col).”

I used the D2 option when plotting, but others exist: stat=“D2”: the association is measured between the quantitative variable and each category separately. A correlation coefficient is used to indicate the strength of the association between the given category and the small or large values of the quantitative variable. stat=“G”: the association between the quantitative variable and the whole categorical variable is measured by a global statistic (F). stat=“D”: the association is estimated between the quantitative variable and each category separately by a measure of the within-group homogeneity. The strength of the association is indicated by the dispersion of the values of the quantitative variable for a given category.

To replot the data for multiple comparisons: “Now, we adjust p-values for multiple comparisons (here we used the fdr method using the p.adjust.4thcorner function).”

Combine both approaches

“First, a multivariate test can be applied to evaluate the global significance of the traits-environment relationships. This test is based on the total inertia of the RLQ analysis”

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.aravo, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test       Obs    Std.Obs   Alter Pvalue
## 1 Model 2 0.6569709 -0.1346780 greater  0.507
## 2 Model 4 0.6569709 -0.9536772 greater  0.829

The total inertia of RLQ analysis is equal to the SRLQ multivariate statistic defined in Dray and Legendre (2008). This statistic is returned by the fourthcorner2 function:

Srlq <- fourthcorner2(p_env[,-10], p_species, p_traits,
     modeltype = 6, p.adjust.method.G = "fdr", nrepet = nrepet)
Srlq$trRLQ
## Monte-Carlo test
## Call: fourthcorner2(tabR = p_env[, -10], tabL = p_species, tabQ = p_traits, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: -8990.343 
## 
## Based on 999 replicates
## Simulated p-value: 0.822 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
## -9.206018e-01 -8.990088e+03  7.649906e-02

“Both approaches can be combined if RLQ scores are used to represent traits and environmental variables on a biplot. Then, significant associations revealed by the fourthcorner approach can be represented using segments (blue lines for negative associations, red lines for positive associations, see the argument col). Only traits and environmental variables that have at least one significant association are represented. Here, we apply this method using adjusted pvalues for multiple comparisons and a significant level α = 0.05.”

“Another approach is provided by the fourthcorner.rlq function and consists in testing directly the links between RLQ axes and traits (typetest=”Q.axes“) or environmental variables (typetest=”R.axes“).”

RLQ axes and traits

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.aravo, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat         Obs     Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.96134310  2.20116058      less
## 2                AxcR2 / Climb.0 Homog.  0.89121986 -0.53679743      less
## 3                AxcR1 / Climb.1 Homog.  0.03686797 -0.24848563      less
## 4                AxcR2 / Climb.1 Homog.  0.10785496  1.78642185      less
## 5                AxcR1 / Acaul.0 Homog.  1.00000000        <NA>      less
## 6                AxcR2 / Acaul.0 Homog.  1.00000000        <NA>      less
## 7                AxcR1 / Erect.0 Homog.  0.03686797 -0.24848563      less
## 8                AxcR2 / Erect.0 Homog.  0.10785496  1.78642185      less
## 9                AxcR1 / Erect.1 Homog.  0.96134310  2.20116058      less
## 10               AxcR2 / Erect.1 Homog.  0.89121986 -0.53679743      less
## 11               AxcR1 / StemS.0 Homog.  0.03698011 -0.82249690      less
## 12               AxcR2 / StemS.0 Homog.  0.10811460  1.69818917      less
## 13               AxcR1 / StemS.1 Homog.  0.48052421 -0.47715061      less
## 14               AxcR2 / StemS.1 Homog.  0.59926258  0.29260277      less
## 15               AxcR1 / StemS.2 Homog.  0.41908006  3.49481660      less
## 16               AxcR2 / StemS.2 Homog.  0.27599200  0.82078570      less
## 17               AxcR1 / StemA.0 Homog.  0.76595294  1.53669110      less
## 18               AxcR2 / StemA.0 Homog.  0.63295693 -1.43746503      less
## 19               AxcR1 / StemA.1 Homog.  0.20361638  0.26186245      less
## 20               AxcR2 / StemA.1 Homog.  0.32299828  0.83189141      less
## 21               AxcR1 / Leave.0 Homog.  0.72348658  2.13924819      less
## 22               AxcR2 / Leave.0 Homog.  0.52504761 -1.56755644      less
## 23               AxcR1 / Leave.1 Homog.  0.24149577  0.02111477      less
## 24               AxcR2 / Leave.1 Homog.  0.44244854  1.66729070      less
## 25       AxcR1 / MaxStemHeight_m      r  0.09149172  0.68994881 two-sided
## 26       AxcR2 / MaxStemHeight_m      r -0.14448147 -1.18998713 two-sided
## 27         AxcR1 / MaxStemDia_cm      r  0.08749172  0.67358979 two-sided
## 28         AxcR2 / MaxStemDia_cm      r -0.12934431 -1.06921687 two-sided
## 29          AxcR1 / Under.canopy Homog.  0.97761339  1.77069366      less
## 30          AxcR2 / Under.canopy Homog.  0.96901013  0.58548969      less
## 31     AxcR1 / Under.understorey Homog.  0.02065195 -0.45299627      less
## 32     AxcR2 / Under.understorey Homog.  0.03098774 -0.29627554      less
## 33 AxcR1 / AverageFruitLength_cm      r  0.24503760  1.89727497 two-sided
## 34 AxcR2 / AverageFruitLength_cm      r -0.12292261 -0.96520838 two-sided
## 35           AxcR1 / Fruit.large Homog.  0.42030052  2.10914139      less
## 36           AxcR2 / Fruit.large Homog.  0.51860246  2.78553943      less
## 37           AxcR1 / Fruit.small Homog.  0.55423824  2.73768704      less
## 38           AxcR2 / Fruit.small Homog.  0.46746559  1.25826119      less
## 39     AxcR1 / Consp.conspicuous Homog.  0.28302363 -1.35476992      less
## 40     AxcR2 / Consp.conspicuous Homog.  0.49950186  1.79562903      less
## 41         AxcR1 / Consp.cryptic Homog.  0.67206694  1.88678666      less
## 42         AxcR2 / Consp.cryptic Homog.  0.46811068 -0.15736019      less
##    Pvalue Pvalue.adj  
## 1   0.996          1  
## 2   0.261  0.8150625  
## 3    0.61  0.8150625  
## 4   0.946          1  
## 5       1          1  
## 6       1          1  
## 7    0.61  0.8150625  
## 8   0.946          1  
## 9   0.996          1  
## 10  0.261  0.8150625  
## 11  0.241  0.8150625  
## 12  0.942          1  
## 13  0.308  0.8150625  
## 14  0.584  0.8150625  
## 15  0.993          1  
## 16  0.833          1  
## 17  0.929          1  
## 18  0.099      0.693  
## 19  0.594  0.8150625  
## 20  0.811          1  
## 21  0.967          1  
## 22   0.07     0.6216  
## 23  0.538  0.8150625  
## 24  0.966          1  
## 25  0.527  0.8150625  
## 26  0.264  0.8150625  
## 27  0.524  0.8150625  
## 28  0.296  0.8150625  
## 29  0.973          1  
## 30  0.713          1  
## 31  0.504  0.8150625  
## 32  0.571  0.8150625  
## 33  0.046     0.6216  
## 34  0.366  0.8150625  
## 35  0.973          1  
## 36  0.993          1  
## 37  0.988          1  
## 38  0.911          1  
## 39  0.074     0.6216  
## 40  0.976          1  
## 41  0.944          1  
## 42  0.429  0.8150625  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

RLQ axes and environmental variables

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.aravo, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                          Test Stat          Obs     Std.Obs     Alter Pvalue
## 1        Canopy.Cover / AxcQ1    r -0.012420893 -0.08504096 two-sided  0.891
## 2  Understory.Density / AxcQ1    r -0.029892325 -0.28535590 two-sided  0.784
## 3         Leaf.Litter / AxcQ1    r  0.083803687  0.83347452 two-sided  0.432
## 4       Soil.Moisture / AxcQ1    r  0.122365689  1.10765079 two-sided  0.265
## 5                 Cec / AxcQ1    r  0.046971395  1.03900906 two-sided  0.333
## 6                 T50 / AxcQ1    r  0.009956983  0.17613818 two-sided  0.897
## 7                 T10 / AxcQ1    r  0.304644385  1.82411195 two-sided  0.079
## 8       Canopy.Height / AxcQ1    r -0.124070105 -1.03016040 two-sided  0.331
## 9           Elevation / AxcQ1    r  0.056259879  0.43232450 two-sided  0.687
## 10       Canopy.Cover / AxcQ2    r  0.014571724  0.12684783 two-sided  0.846
## 11 Understory.Density / AxcQ2    r -0.114617370 -1.15933364 two-sided   0.27
## 12        Leaf.Litter / AxcQ2    r  0.049781194  0.49259572 two-sided  0.636
## 13      Soil.Moisture / AxcQ2    r -0.068450849 -0.84961406 two-sided  0.419
## 14                Cec / AxcQ2    r  0.027732905  0.71951008 two-sided  0.499
## 15                T50 / AxcQ2    r  0.098808237  1.14865071 two-sided  0.219
## 16                T10 / AxcQ2    r -0.062682617 -0.36973774 two-sided  0.699
## 17      Canopy.Height / AxcQ2    r -0.090071839 -0.81666971 two-sided   0.48
## 18          Elevation / AxcQ2    r  0.117191890  0.95719518 two-sided  0.367
##           Pvalue.adj  
## 1              0.891  
## 2              0.882  
## 3  0.816545454545455  
## 4  0.777857142857143  
## 5  0.816545454545455  
## 6              0.897  
## 7              0.708  
## 8  0.816545454545455  
## 9  0.834352941176471  
## 10             0.891  
## 11 0.777857142857143  
## 12 0.834352941176471  
## 13 0.816545454545455  
## 14 0.816545454545455  
## 15 0.777857142857143  
## 16 0.834352941176471  
## 17 0.816545454545455  
## 18 0.816545454545455  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Results can be represented using a table with colors indicating significance :

Significance with axes can also be reported on the factorial map of RLQ analysis. Here, significant associations with the first axis are represented in blue, with the second axis in orange, with both axes in green (variables with no significant association are in black)

RUN 2 RLQ/4th corner: Splitting all lifestage and points with some forest cover

Run RLQ/ FQ analysis for all lifestage types

That’s unreadable, plotting as separate.

## [1] "RLQ for juveniles"

## [1] "RLQ for adults"

Summary of RLQ analysis. How to interpret this?

## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Rjuv, dudiL = Ljuv, dudiQ = Qjuv, scannf = FALSE)
## 
## Total inertia: 1.429
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 0.746537 0.500895 0.121014 0.054025 0.003262 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
## 52.2481 35.0563  8.4695  3.7811  0.2283 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   52.25   87.30   95.77   99.55   99.78 
## 
## (Only 5 dimensions (out of 9) are shown)
## 
## 
## Eigenvalues decomposition:
##         eig     covar      sdR      sdQ      corr
## 1 0.7465371 0.8640238 1.170836 1.785317 0.4133466
## 2 0.5008948 0.7077392 1.244773 1.691688 0.3360957
## 
## Inertia & coinertia R (Rjuv):
##     inertia      max     ratio
## 1  1.370856 1.858611 0.7375703
## 12 2.920316 3.464436 0.8429412
## 
## Inertia & coinertia Q (Qjuv):
##     inertia      max     ratio
## 1  3.187357 5.160919 0.6175949
## 12 6.049164 7.993775 0.7567344
## 
## Correlation L (Ljuv):
##        corr       max     ratio
## 1 0.4133466 0.9448971 0.4374514
## 2 0.3360957 0.9087471 0.3698452
## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Radu, dudiL = Ladu, dudiQ = Qadu, scannf = FALSE)
## 
## Total inertia: 1.04
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 0.564979 0.338546 0.115397 0.015354 0.003838 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
##  54.314  32.546  11.094   1.476   0.369 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   54.31   86.86   97.95   99.43   99.80 
## 
## (Only 5 dimensions (out of 10) are shown)
## 
## 
## Eigenvalues decomposition:
##         eig     covar      sdR      sdQ      corr
## 1 0.5649794 0.7516511 1.317944 1.702729 0.3349451
## 2 0.3385457 0.5818468 1.128801 2.171484 0.2373747
## 
## Inertia & coinertia R (Radu):
##     inertia      max     ratio
## 1  1.736977 2.095715 0.8288231
## 12 3.011170 3.680365 0.8181714
## 
## Inertia & coinertia Q (Qadu):
##     inertia      max     ratio
## 1  2.899287 4.937157 0.5872382
## 12 7.614631 7.890549 0.9650318
## 
## Correlation L (Ladu):
##        corr       max     ratio
## 1 0.3349451 1.0000000 0.3349451
## 2 0.2373747 0.9128287 0.2600430

Fourth-corner analysis

## [1] "FQ for juveniles"

## [1] "FQ for adults"

With adjusted p-values

## [1] "FQ for Juveniles"
## [1] "FQ for Adults"

Combine both approaches

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test     Obs    Std.Obs   Alter Pvalue
## 1 Model 2 1.42883  0.1299938 greater  0.373
## 2 Model 4 1.42883 -0.2833431 greater  0.569

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test      Obs    Std.Obs   Alter Pvalue
## 1 Model 2 1.040218 14.1026397 greater  0.001
## 2 Model 4 1.040218 -0.1732769 greater  0.549

The total inertia of RLQ analysis is equal to the SRLQ multivariate statistic defined in Dray and Legendre (2008). This statistic is returned by the fourthcorner2 function:

## Monte-Carlo test
## Call: fourthcorner2(tabR = p_envFORCOVER, tabL = p_speciesJUV, tabQ = p_traits, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: -8989.571 
## 
## Based on 848 replicates
## Simulated p-value: 0.5206125 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
##  3.635986e-01 -1.067521e+04  2.149238e+07
## Monte-Carlo test
## Call: fourthcorner2(tabR = p_envFORCOVER, tabL = p_speciesADU, tabQ = p_traits, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: -8989.96 
## 
## Based on 999 replicates
## Simulated p-value: 0.469 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
##  3.555372e-01 -1.065493e+04  2.193028e+07
## [1] "juvenile"

## [1] "adult"

“Another approach is provided by the fourthcorner.rlq function and consists in testing directly the links between RLQ axes and traits (typetest=”Q.axes“) or environmental variables (typetest=”R.axes“).”

RLQ axes and traits

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat          Obs     Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.935408906  0.96730878      less
## 2                AxcR2 / Climb.0 Homog.  0.896219686 -0.46788626      less
## 3                AxcR1 / Climb.1 Homog.  0.062673284  0.07444970      less
## 4                AxcR2 / Climb.1 Homog.  0.100874152  0.87771669      less
## 5                AxcR1 / Acaul.0 Homog.  1.000000000        <NA>      less
## 6                AxcR2 / Acaul.0 Homog.  1.000000000        <NA>      less
## 7                AxcR1 / Erect.0 Homog.  0.062673284  0.07444970      less
## 8                AxcR2 / Erect.0 Homog.  0.100874152  0.87771669      less
## 9                AxcR1 / Erect.1 Homog.  0.935408906  0.96730878      less
## 10               AxcR2 / Erect.1 Homog.  0.896219686 -0.46788626      less
## 11               AxcR1 / StemS.0 Homog.  0.062673284 -0.42172090      less
## 12               AxcR2 / StemS.0 Homog.  0.100874152  0.87771669      less
## 13               AxcR1 / StemS.1 Homog.  0.434638318 -0.66069204      less
## 14               AxcR2 / StemS.1 Homog.  0.515663169 -0.21398743      less
## 15               AxcR1 / StemS.2 Homog.  0.336057240  1.95516021      less
## 16               AxcR2 / StemS.2 Homog.  0.379436083  2.91532672      less
## 17               AxcR1 / StemA.0 Homog.  0.823478093  2.21574440      less
## 18               AxcR2 / StemA.0 Homog.  0.594579406 -1.47389245      less
## 19               AxcR1 / StemA.1 Homog.  0.174538043  0.04400098      less
## 20               AxcR2 / StemA.1 Homog.  0.280158884  0.47985122      less
## 21               AxcR1 / Leave.0 Homog.  0.758100818  2.24583807      less
## 22               AxcR2 / Leave.0 Homog.  0.493674666 -1.56170756      less
## 23               AxcR1 / Leave.1 Homog.  0.237514667  0.04512235      less
## 24               AxcR2 / Leave.1 Homog.  0.419778917  1.50727468      less
## 25       AxcR1 / MaxStemHeight_m      r -0.210341823 -1.33485794 two-sided
## 26       AxcR2 / MaxStemHeight_m      r -0.077264855 -0.60188406 two-sided
## 27         AxcR1 / MaxStemDia_cm      r -0.214542329 -1.34534367 two-sided
## 28         AxcR2 / MaxStemDia_cm      r -0.059720466 -0.50256913 two-sided
## 29          AxcR1 / Under.canopy Homog.  0.980841113  0.92303525      less
## 30          AxcR2 / Under.canopy Homog.  0.982255001  1.08882504      less
## 31     AxcR1 / Under.understorey Homog.  0.017971110 -0.50703885      less
## 32     AxcR2 / Under.understorey Homog.  0.017628019 -0.52176153      less
## 33 AxcR1 / AverageFruitLength_cm      r -0.411890001 -2.72154411 two-sided
## 34 AxcR2 / AverageFruitLength_cm      r -0.004254722 -0.05040763 two-sided
## 35           AxcR1 / Fruit.large Homog.  0.384995644  1.64637176      less
## 36           AxcR2 / Fruit.large Homog.  0.464108800  2.20963518      less
## 37           AxcR1 / Fruit.small Homog.  0.515842044  2.27569208      less
## 38           AxcR2 / Fruit.small Homog.  0.534845101  2.63988352      less
## 39     AxcR1 / Consp.conspicuous Homog.  0.273692963 -1.14915964      less
## 40     AxcR2 / Consp.conspicuous Homog.  0.460961375  1.47668390      less
## 41         AxcR1 / Consp.cryptic Homog.  0.718840507  2.13546153      less
## 42         AxcR2 / Consp.cryptic Homog.  0.448132549 -0.23765943      less
##               Pvalue        Pvalue.adj  
## 1              0.834                 1  
## 2              0.239 0.939555555555556  
## 3  0.729545454545454 0.953181818181818  
## 4              0.816                 1  
## 5                  1                 1  
## 6                  1                 1  
## 7  0.729545454545454 0.953181818181818  
## 8              0.816                 1  
## 9              0.834                 1  
## 10             0.239 0.939555555555556  
## 11  0.48991935483871 0.939555555555556  
## 12             0.816                 1  
## 13              0.29 0.939555555555556  
## 14             0.435 0.939555555555556  
## 15              0.94                 1  
## 16             0.982                 1  
## 17             0.984                 1  
## 18             0.088            0.7476  
## 19             0.573 0.939555555555556  
## 20             0.672                 1  
## 21             0.976                 1  
## 22             0.089            0.7476  
## 23              0.54 0.939555555555556  
## 24             0.951                 1  
## 25               0.2 0.939555555555556  
## 26             0.577                 1  
## 27             0.198 0.939555555555556  
## 28             0.664                 1  
## 29             0.817                 1  
## 30             0.867                 1  
## 31 0.500576701268743 0.939555555555556  
## 32 0.567474048442907 0.939555555555556  
## 33             0.001             0.042 *
## 34             0.967                 1  
## 35             0.944                 1  
## 36             0.976                 1  
## 37             0.967                 1  
## 38             0.985                 1  
## 39             0.136 0.939555555555556  
## 40             0.953                 1  
## 41              0.97                 1  
## 42             0.424 0.939555555555556  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat          Obs     Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.836672753 -1.25688155      less
## 2                AxcR2 / Climb.0 Homog.  0.940072279  0.35896830      less
## 3                AxcR1 / Climb.1 Homog.  0.074800140  0.75299442      less
## 4                AxcR2 / Climb.1 Homog.  0.056918191 -0.05118715      less
## 5                AxcR1 / Acaul.0 Homog.  1.000000000        <NA>      less
## 6                AxcR2 / Acaul.0 Homog.  1.000000000        <NA>      less
## 7                AxcR1 / Erect.0 Homog.  0.074800140  0.75299442      less
## 8                AxcR2 / Erect.0 Homog.  0.056918191 -0.05118715      less
## 9                AxcR1 / Erect.1 Homog.  0.836672753 -1.25688155      less
## 10               AxcR2 / Erect.1 Homog.  0.940072279  0.35896830      less
## 11               AxcR1 / StemS.0 Homog.  0.100179857  2.12995286      less
## 12               AxcR2 / StemS.0 Homog.  0.061059378 -0.48373717      less
## 13               AxcR1 / StemS.1 Homog.  0.641005501  0.57497054      less
## 14               AxcR2 / StemS.1 Homog.  0.722324576  1.17791479      less
## 15               AxcR1 / StemS.2 Homog.  0.155320246 -0.92942985      less
## 16               AxcR2 / StemS.2 Homog.  0.193553765 -0.63288592      less
## 17               AxcR1 / StemA.0 Homog.  0.656649208  1.80265637      less
## 18               AxcR2 / StemA.0 Homog.  0.629379796  0.73860010      less
## 19               AxcR1 / StemA.1 Homog.  0.312689117  1.17801079      less
## 20               AxcR2 / StemA.1 Homog.  0.363941396  1.34293539      less
## 21               AxcR1 / Leave.0 Homog.  0.510919122 -1.69942334      less
## 22               AxcR2 / Leave.0 Homog.  0.566988117  0.85126100      less
## 23               AxcR1 / Leave.1 Homog.  0.488493502  1.01718767      less
## 24               AxcR2 / Leave.1 Homog.  0.421492370  1.17374967      less
## 25       AxcR1 / MaxStemHeight_m      r  0.088990901  0.55193677 two-sided
## 26       AxcR2 / MaxStemHeight_m      r  0.252057476  2.13834988 two-sided
## 27         AxcR1 / MaxStemDia_cm      r -0.035464815 -0.25817726 two-sided
## 28         AxcR2 / MaxStemDia_cm      r  0.258239812  2.20446456 two-sided
## 29          AxcR1 / Under.canopy Homog.  0.940406773  0.47747322      less
## 30          AxcR2 / Under.canopy Homog.  0.949032509  1.00781417      less
## 31     AxcR1 / Under.understorey Homog.  0.058403035  0.07372075      less
## 32     AxcR2 / Under.understorey Homog.  0.049026243 -0.16777458      less
## 33 AxcR1 / AverageFruitLength_cm      r -0.004633307 -0.16778394 two-sided
## 34 AxcR2 / AverageFruitLength_cm      r  0.158137536  1.37845374 two-sided
## 35           AxcR1 / Fruit.large Homog.  0.463222263  2.50854387      less
## 36           AxcR2 / Fruit.large Homog.  0.558166806  0.48794982      less
## 37           AxcR1 / Fruit.small Homog.  0.534548704  2.61819964      less
## 38           AxcR2 / Fruit.small Homog.  0.400441438 -1.69145817      less
## 39     AxcR1 / Consp.conspicuous Homog.  0.559426785  1.05934370      less
## 40     AxcR2 / Consp.conspicuous Homog.  0.506219974  0.04933554      less
## 41         AxcR1 / Consp.cryptic Homog.  0.439722847 -0.26063794      less
## 42         AxcR2 / Consp.cryptic Homog.  0.473926570 -0.05589842      less
##               Pvalue        Pvalue.adj  
## 1              0.127             0.654  
## 2              0.598             0.966  
## 3              0.791                 1  
## 4  0.793397231096912                 1  
## 5                  1                 1  
## 6                  1                 1  
## 7              0.791                 1  
## 8  0.793397231096912                 1  
## 9              0.127             0.654  
## 10             0.598             0.966  
## 11             0.974                 1  
## 12             0.495                 1  
## 13             0.681                 1  
## 14             0.881                 1  
## 15             0.218             0.654  
## 16             0.345          0.905625  
## 17             0.966                 1  
## 18              0.77                 1  
## 19             0.854                 1  
## 20             0.881                 1  
## 21             0.056            0.4704  
## 22             0.802                 1  
## 23             0.842                 1  
## 24             0.887                 1  
## 25             0.631                 1  
## 26             0.004             0.084 .
## 27             0.791                 1  
## 28             0.002             0.084 .
## 29             0.664                 1  
## 30              0.84                 1  
## 31 0.647497337593184                 1  
## 32 0.647497337593184                 1  
## 33             0.868                 1  
## 34             0.197             0.654  
## 35             0.981                 1  
## 36             0.688                 1  
## 37             0.996                 1  
## 38             0.043             0.168  
## 39             0.855                 1  
## 40             0.538                 1  
## 41              0.41 0.956666666666667  
## 42             0.483                 1  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

RLQ axes and environmental variables

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                          Test   Stat          Obs    Std.Obs     Alter Pvalue        Pvalue.adj  
## 1        Canopy.Cover / AxcQ1      r -0.023925899 -0.1934982 two-sided  0.793 0.906285714285714  
## 2  Understory.Density / AxcQ1      r -0.046616337 -0.3474136 two-sided  0.763 0.906285714285714  
## 3         Leaf.Litter / AxcQ1      r -0.004365802 -0.0126180 two-sided  0.987             0.987  
## 4       Soil.Moisture / AxcQ1      r -0.220288874 -1.6287285 two-sided   0.11 0.377142857142857  
## 5                 Cec / AxcQ1      r -0.021245562 -0.1654269 two-sided  0.739 0.906285714285714  
## 6                 T50 / AxcQ1      r  0.050329640  0.6670247 two-sided  0.555 0.830181818181818  
## 7                 T10 / AxcQ1      r -0.314893261 -1.4962719 two-sided  0.135             0.648  
## 8       Canopy.Height / AxcQ1      r  0.080491140  0.5959590 two-sided  0.586 0.830181818181818  
## 9           Elevation / AxcQ1      r  0.074152550  0.5241494 two-sided  0.629 0.838666666666667  
## 10      Habit.Primary / AxcQ1 Homog.  0.339462103 -1.5132647      less  0.087             0.522  
## 11    Habit.Secondary / AxcQ1 Homog.  0.586665219  1.2752312      less  0.886 0.924521739130435  
## 12   Habit.Transition / AxcQ1 Homog.  0.005065871 -0.3037668      less  0.434 0.801230769230769  
## 13       Canopy.Cover / AxcQ2      r -0.077862187 -1.1990435 two-sided   0.25 0.690666666666667  
## 14 Understory.Density / AxcQ2      r -0.189627260 -1.6219673 two-sided   0.11 0.377142857142857  
## 15        Leaf.Litter / AxcQ2      r  0.155590484  1.1873636 two-sided  0.259 0.690666666666667  
## 16      Soil.Moisture / AxcQ2      r -0.067983135 -0.5704121 two-sided  0.618 0.830181818181818  
## 17                Cec / AxcQ2      r  0.052327639  0.8462091 two-sided  0.423 0.801230769230769  
## 18                T50 / AxcQ2      r  0.153959525  1.5089620 two-sided  0.176 0.474666666666667  
## 19                T10 / AxcQ2      r  0.119721332  0.5934057 two-sided  0.587 0.830181818181818  
## 20      Canopy.Height / AxcQ2      r -0.132627095 -1.0155636 two-sided   0.36 0.785454545454545  
## 21          Elevation / AxcQ2      r  0.213975341  1.4183420 two-sided  0.176 0.690666666666667  
## 22      Habit.Primary / AxcQ2 Homog.  0.548269612  1.2032756      less  0.882 0.922434782608696  
## 23    Habit.Secondary / AxcQ2 Homog.  0.448034986 -0.5104000      less  0.298            0.7152  
## 24   Habit.Transition / AxcQ2 Homog.  0.003669394 -0.7159396      less  0.203 0.690666666666667  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                          Test   Stat          Obs     Std.Obs     Alter Pvalue        Pvalue.adj  
## 1        Canopy.Cover / AxcQ1      r -0.020525343 -0.52987608 two-sided  0.593 0.884210526315789  
## 2  Understory.Density / AxcQ1      r  0.176408140  1.90263412 two-sided  0.066            0.6384  
## 3         Leaf.Litter / AxcQ1      r -0.050385708 -0.56929404 two-sided  0.642 0.884210526315789  
## 4       Soil.Moisture / AxcQ1      r -0.201383111 -1.92812765 two-sided  0.084            0.6384  
## 5                 Cec / AxcQ1      r -0.032244658 -0.69057769 two-sided  0.552 0.884210526315789  
## 6                 T50 / AxcQ1      r  0.062841701  1.54634036 two-sided  0.133            0.6384  
## 7                 T10 / AxcQ1      r  0.104356069  1.04877602 two-sided  0.335 0.884210526315789  
## 8       Canopy.Height / AxcQ1      r -0.079818074 -0.61186294 two-sided   0.53 0.884210526315789  
## 9           Elevation / AxcQ1      r  0.292632454  1.94190843 two-sided  0.061            0.6384  
## 10      Habit.Primary / AxcQ1 Homog.  0.616404905  3.82920806      less      1                 1  
## 11    Habit.Secondary / AxcQ1 Homog.  0.351213487  0.06348844      less  0.453 0.884210526315789  
## 12   Habit.Transition / AxcQ1 Homog.  0.020031880  1.01380927      less   0.89 0.970909090909091  
## 13       Canopy.Cover / AxcQ2      r -0.059842511 -1.41144181 two-sided  0.177 0.685714285714286  
## 14 Understory.Density / AxcQ2      r -0.043046543 -0.55372181 two-sided  0.589 0.884210526315789  
## 15        Leaf.Litter / AxcQ2      r  0.116980880  1.34077455 two-sided    0.2 0.685714285714286  
## 16      Soil.Moisture / AxcQ2      r -0.059469654 -0.50494174 two-sided  0.671 0.884210526315789  
## 17                Cec / AxcQ2      r  0.003349974  0.07791062 two-sided  0.949                 1  
## 18                T50 / AxcQ2      r -0.015681784 -0.42301126 two-sided    0.7 0.884210526315789  
## 19                T10 / AxcQ2      r  0.114251067  0.99929615 two-sided  0.404 0.884210526315789  
## 20      Canopy.Height / AxcQ2      r  0.185686323  1.51680403 two-sided  0.122            0.6384  
## 21          Elevation / AxcQ2      r  0.006309089  0.11471122 two-sided  0.901                 1  
## 22      Habit.Primary / AxcQ2 Homog.  0.671935150  7.51254013      less      1                 1  
## 23    Habit.Secondary / AxcQ2 Homog.  0.315497275 -0.70813760      less  0.244             0.732  
## 24   Habit.Transition / AxcQ2 Homog.  0.011255924  0.97553325      less  0.842 0.962285714285714  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Results can be represented using a table with colors indicating significance :

## [1] "juveniles"

## [1] "adults"

Significance with axes can also be reported on the factorial map of RLQ analysis. Here, significant associations with the first axis are represented in blue, with the second axis in orange, with both axes in green (variables with no significant association are in black)

## [1] "juveniles"

## [1] "adults"

RUN 3 RLQ/4th corner : Sarah data with endemism, distance to edge

First,Checking to see which environmental variables may be removed. Next, adding “endemism” as a trait and distance to edge as an environmental variable. Also, removing acualescence as a trait because it is 0 for all species

Run RLQ/ FQ analysis for all lifestage types with aforementioned additions and subtractions

That’s unreadable, plotting as separate.

## [1] "RLQ for juveniles"

## [1] "RLQ for adults"

Summary of RLQ analysis. How to interpret this?

## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Rjuv, dudiL = Ljuv, dudiQ = Qjuv, scannf = FALSE)
## 
## Total inertia: 1.975
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 1.068016 0.572979 0.260072 0.058277 0.008798 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
## 54.0782 29.0124 13.1685  2.9508  0.4455 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   54.08   83.09   96.26   99.21   99.66 
## 
## (Only 5 dimensions (out of 10) are shown)
## 
## 
## Eigenvalues decomposition:
##         eig     covar      sdR      sdQ      corr
## 1 1.0680159 1.0334485 1.213733 1.951642 0.4362804
## 2 0.5729787 0.7569535 1.339490 1.692774 0.3338341
## 
## Inertia & coinertia R (Rjuv):
##     inertia      max     ratio
## 1  1.473147 2.274586 0.6476549
## 12 3.267380 4.065173 0.8037494
## 
## Inertia & coinertia Q (Qjuv):
##     inertia      max     ratio
## 1  3.808907 5.923820 0.6429815
## 12 6.674392 8.831465 0.7557514
## 
## Correlation L (Ljuv):
##        corr       max     ratio
## 1 0.4362804 0.9448971 0.4617226
## 2 0.3338341 0.9087471 0.3673564
## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Radu, dudiL = Ladu, dudiQ = Qadu, scannf = FALSE)
## 
## Total inertia: 1.293
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 0.672181 0.425872 0.163038 0.017476 0.009739 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
##  51.968  32.925  12.605   1.351   0.753 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   51.97   84.89   97.50   98.85   99.60 
## 
## (Only 5 dimensions (out of 11) are shown)
## 
## 
## Eigenvalues decomposition:
##         eig     covar      sdR      sdQ      corr
## 1 0.6721809 0.8198664 1.395634 1.815107 0.3236454
## 2 0.4258725 0.6525890 1.207022 2.232108 0.2422197
## 
## Inertia & coinertia R (Radu):
##     inertia      max     ratio
## 1  1.947793 2.268344 0.8586852
## 12 3.404695 4.369762 0.7791489
## 
## Inertia & coinertia Q (Qadu):
##     inertia      max     ratio
## 1  3.294613 5.622196 0.5860011
## 12 8.276917 8.644041 0.9575287
## 
## Correlation L (Ladu):
##        corr       max     ratio
## 1 0.3236454 1.0000000 0.3236454
## 2 0.2422197 0.9128287 0.2653507

Fourth-corner analysis

## [1] "FQ for juveniles"

## [1] "FQ for adults"

With adjusted p-values

## [1] "FQ for Juveniles"
## [1] "FQ for Adults"

Combine both approaches

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test      Obs    Std.Obs   Alter Pvalue
## 1 Model 2 1.974947  0.4027757 greater  0.291
## 2 Model 4 1.974947 -0.2273317 greater  0.546

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test      Obs     Std.Obs   Alter Pvalue
## 1 Model 2 1.293452 14.71916817 greater  0.001
## 2 Model 4 1.293452 -0.03643322 greater  0.466

The total inertia of RLQ analysis is equal to the SRLQ multivariate statistic defined in Dray and Legendre (2008). This statistic is returned by the fourthcorner2 function:

## Monte-Carlo test
## Call: fourthcorner2(tabR = p_envFORCOVER1, tabL = p_speciesJUV, tabQ = p_traits1, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: 1.974947 
## 
## Based on 866 replicates
## Simulated p-value: 0.4913495 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
##  3.796297e-01 -2.332691e+03  3.782066e+07
## Monte-Carlo test
## Call: fourthcorner2(tabR = p_envFORCOVER1, tabL = p_speciesADU, tabQ = p_traits1, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: 1.293452 
## 
## Based on 999 replicates
## Simulated p-value: 0.443 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
##  3.518997e-01 -2.044701e+03  3.380422e+07
## [1] "juvenile"

## [1] "adult"

“Another approach is provided by the fourthcorner.rlq function and consists in testing directly the links between RLQ axes and traits (typetest=”Q.axes“) or environmental variables (typetest=”R.axes“).”

RLQ axes and traits

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat          Obs      Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.945477135  1.644711165      less
## 2                AxcR2 / Climb.0 Homog.  0.884556355 -0.559675476      less
## 3                AxcR1 / Climb.1 Homog.  0.054208266 -0.071499872      less
## 4                AxcR2 / Climb.1 Homog.  0.105893450  1.214057618      less
## 5                AxcR1 / Erect.0 Homog.  0.054208266 -0.071499872      less
## 6                AxcR2 / Erect.0 Homog.  0.105893450  1.214057618      less
## 7                AxcR1 / Erect.1 Homog.  0.945477135  1.644711165      less
## 8                AxcR2 / Erect.1 Homog.  0.884556355 -0.559675476      less
## 9                AxcR1 / StemS.0 Homog.  0.054208266 -0.423860413      less
## 10               AxcR2 / StemS.0 Homog.  0.105893450  1.214057618      less
## 11               AxcR1 / StemS.1 Homog.  0.380433350 -0.790850604      less
## 12               AxcR2 / StemS.1 Homog.  0.519443898 -0.190177645      less
## 13               AxcR1 / StemS.2 Homog.  0.387416329  3.256931968      less
## 14               AxcR2 / StemS.2 Homog.  0.364118086  2.669146436      less
## 15               AxcR1 / StemA.0 Homog.  0.862983900  3.590490325      less
## 16               AxcR2 / StemA.0 Homog.  0.575792235 -1.478298089      less
## 17               AxcR1 / StemA.1 Homog.  0.131927351 -0.256165730      less
## 18               AxcR2 / StemA.1 Homog.  0.299807880  0.999445173      less
## 19               AxcR1 / Leave.0 Homog.  0.807867917  3.659986759      less
## 20               AxcR2 / Leave.0 Homog.  0.468368195 -1.599902173      less
## 21               AxcR1 / Leave.1 Homog.  0.186385750 -0.257701882      less
## 22               AxcR2 / Leave.1 Homog.  0.459927639  2.409842409      less
## 23       AxcR1 / MaxStemHeight_m      r -0.218783235 -1.687116681 two-sided
## 24       AxcR2 / MaxStemHeight_m      r -0.050094714 -0.446951723 two-sided
## 25         AxcR1 / MaxStemDia_cm      r -0.231774637 -1.838764332 two-sided
## 26         AxcR2 / MaxStemDia_cm      r -0.022327830 -0.241144882 two-sided
## 27          AxcR1 / Under.canopy Homog.  0.981133672  0.997810786      less
## 28          AxcR2 / Under.canopy Homog.  0.983071859  1.354174870      less
## 29     AxcR1 / Under.understorey Homog.  0.017369015 -0.443900260      less
## 30     AxcR2 / Under.understorey Homog.  0.016833528 -0.503398199      less
## 31 AxcR1 / AverageFruitLength_cm      r -0.449741361 -3.744479789 two-sided
## 32 AxcR2 / AverageFruitLength_cm      r  0.007527516  0.005418088 two-sided
## 33           AxcR1 / Fruit.large Homog.  0.340522774  0.929814931      less
## 34           AxcR2 / Fruit.large Homog.  0.468842134  1.875589046      less
## 35           AxcR1 / Fruit.small Homog.  0.540864334  3.001857545      less
## 36           AxcR2 / Fruit.small Homog.  0.531078240  2.647393601      less
## 37     AxcR1 / Consp.conspicuous Homog.  0.213221105 -1.196438234      less
## 38     AxcR2 / Consp.conspicuous Homog.  0.498863815  2.278232222      less
## 39         AxcR1 / Consp.cryptic Homog.  0.777076692  3.637483042      less
## 40         AxcR2 / Consp.cryptic Homog.  0.425418835 -0.324531027      less
## 41               AxcR1 / Endem.N Homog.  0.626554463  1.823543405      less
## 42               AxcR2 / Endem.N Homog.  0.678021387  2.673524872      less
## 43               AxcR1 / Endem.Y Homog.  0.271527689  0.542596677      less
## 44               AxcR2 / Endem.Y Homog.  0.307339342  0.826279425      less
##               Pvalue        Pvalue.adj  
## 1              0.962                 1  
## 2               0.18             0.732  
## 3  0.661308840413318          0.928125  
## 4              0.889                 1  
## 5  0.661308840413318          0.928125  
## 6              0.889                 1  
## 7              0.962                 1  
## 8               0.18             0.732  
## 9  0.466263846928499          0.928125  
## 10             0.889                 1  
## 11             0.287 0.868266666666667  
## 12             0.428          0.928125  
## 13             0.996                 1  
## 14             0.979                 1  
## 15                 1                 1  
## 16             0.088 0.645333333333333  
## 17             0.571          0.928125  
## 18             0.859                 1  
## 19                 1                 1  
## 20             0.079 0.645333333333333  
## 21             0.547          0.928125  
## 22             0.998                 1  
## 23             0.084 0.645333333333333  
## 24               0.7                 1  
## 25              0.05 0.645333333333333  
## 26              0.81                 1  
## 27             0.843                 1  
## 28             0.929                 1  
## 29  0.57271702367531          0.928125  
## 30  0.57271702367531          0.928125  
## 31             0.001             0.044 *
## 32             0.991                 1  
## 33             0.805 0.933658536585366  
## 34             0.934 0.955720930232558  
## 35             0.995                 1  
## 36             0.981                 1  
## 37             0.144             0.732  
## 38             0.998                 1  
## 39                 1                 1  
## 40             0.416          0.928125  
## 41              0.96                 1  
## 42             0.988                 1  
## 43             0.789 0.933658536585366  
## 44             0.773 0.933658536585366  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat          Obs     Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.841812710 -0.86897411      less
## 2                AxcR2 / Climb.0 Homog.  0.924796744 -0.09910806      less
## 3                AxcR1 / Climb.1 Homog.  0.067439724  0.24962085      less
## 4                AxcR2 / Climb.1 Homog.  0.072430551  0.59302041      less
## 5                AxcR1 / Erect.0 Homog.  0.067439724  0.24962085      less
## 6                AxcR2 / Erect.0 Homog.  0.072430551  0.59302041      less
## 7                AxcR1 / Erect.1 Homog.  0.841812710 -0.86897411      less
## 8                AxcR2 / Erect.1 Homog.  0.924796744 -0.09910806      less
## 9                AxcR1 / StemS.0 Homog.  0.082594544  0.96621178      less
## 10               AxcR2 / StemS.0 Homog.  0.083374225  0.95552904      less
## 11               AxcR1 / StemS.1 Homog.  0.694922901  0.38548006      less
## 12               AxcR2 / StemS.1 Homog.  0.685575518  0.56800533      less
## 13               AxcR1 / StemS.2 Homog.  0.130667939 -0.87098122      less
## 14               AxcR2 / StemS.2 Homog.  0.198308887 -0.51825491      less
## 15               AxcR1 / StemA.0 Homog.  0.648870257  1.75263776      less
## 16               AxcR2 / StemA.0 Homog.  0.642744462  1.25347184      less
## 17               AxcR1 / StemA.1 Homog.  0.329579335  0.92117432      less
## 18               AxcR2 / StemA.1 Homog.  0.338812763  0.95945790      less
## 19               AxcR1 / Leave.0 Homog.  0.505089624 -1.30692823      less
## 20               AxcR2 / Leave.0 Homog.  0.569725279  0.98173494      less
## 21               AxcR1 / Leave.1 Homog.  0.494881677  1.42694462      less
## 22               AxcR2 / Leave.1 Homog.  0.418810648  0.94028598      less
## 23       AxcR1 / MaxStemHeight_m      r  0.003197412  0.12089622 two-sided
## 24       AxcR2 / MaxStemHeight_m      r  0.263194854  3.21435000 two-sided
## 25         AxcR1 / MaxStemDia_cm      r -0.119355199 -1.45251886 two-sided
## 26         AxcR2 / MaxStemDia_cm      r  0.223711894  2.69888514 two-sided
## 27          AxcR1 / Under.canopy Homog.  0.928837710 -0.07746171      less
## 28          AxcR2 / Under.canopy Homog.  0.950768106  1.22287367      less
## 29     AxcR1 / Under.understorey Homog.  0.071162280  0.57312619      less
## 30     AxcR2 / Under.understorey Homog.  0.045471879 -0.16289548      less
## 31 AxcR1 / AverageFruitLength_cm      r -0.066611177 -0.86504571 two-sided
## 32 AxcR2 / AverageFruitLength_cm      r  0.138195696  1.72026216 two-sided
## 33           AxcR1 / Fruit.large Homog.  0.478159238  1.77564886      less
## 34           AxcR2 / Fruit.large Homog.  0.546837490  0.15860165      less
## 35           AxcR1 / Fruit.small Homog.  0.506895955  1.91755720      less
## 36           AxcR2 / Fruit.small Homog.  0.425601061 -2.21193557      less
## 37     AxcR1 / Consp.conspicuous Homog.  0.551403489  0.84702888      less
## 38     AxcR2 / Consp.conspicuous Homog.  0.503102864  0.07451705      less
## 39         AxcR1 / Consp.cryptic Homog.  0.448532026 -0.26065002      less
## 40         AxcR2 / Consp.cryptic Homog.  0.478281080  0.26273379      less
## 41               AxcR1 / Endem.N Homog.  0.775133372  4.13580897      less
## 42               AxcR2 / Endem.N Homog.  0.604850130 -1.14140320      less
## 43               AxcR1 / Endem.Y Homog.  0.208358993  0.11105495      less
## 44               AxcR2 / Endem.Y Homog.  0.359383838  1.21998245      less
##               Pvalue        Pvalue.adj  
## 1              0.131 0.601333333333333  
## 2              0.179 0.601333333333333  
## 3               0.64 0.971034482758621  
## 4              0.742 0.983024390243903  
## 5               0.64 0.971034482758621  
## 6              0.742 0.983024390243903  
## 7              0.131 0.601333333333333  
## 8              0.179 0.601333333333333  
## 9              0.845 0.983024390243903  
## 10             0.826 0.983024390243903  
## 11             0.621 0.971034482758621  
## 12             0.598            0.8932  
## 13             0.262 0.678117647058824  
## 14             0.364            0.8008  
## 15             0.955 0.993581395348837  
## 16               0.9 0.983024390243903  
## 17             0.812            0.8932  
## 18             0.812            0.8932  
## 19             0.153 0.601333333333333  
## 20             0.825 0.983024390243903  
## 21             0.916 0.983024390243903  
## 22             0.764            0.8932  
## 23             0.897 0.983024390243903  
## 24             0.001             0.044 *
## 25             0.165 0.601333333333333  
## 26             0.003             0.066 .
## 27             0.193 0.601333333333333  
## 28             0.899 0.983024390243903  
## 29             0.751 0.983024390243903  
## 30 0.643702906350915            0.8932  
## 31              0.44             0.886  
## 32             0.084 0.601333333333333  
## 33             0.945              0.96  
## 34             0.558 0.971034482758621  
## 35             0.971 0.993581395348837  
## 36             0.045 0.601333333333333  
## 37               0.8 0.983024390243903  
## 38             0.529            0.8932  
## 39             0.443             0.886  
## 40             0.609 0.971034482758621  
## 41                 1                 1  
## 42             0.205 0.601333333333333  
## 43             0.675            0.8932  
## 44             0.884 0.983024390243903  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

RLQ axes and environmental variables

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                          Test   Stat          Obs     Std.Obs     Alter Pvalue        Pvalue.adj  
## 1        Canopy.Cover / AxcQ1      r -0.026689446 -0.51451574 two-sided  0.638 0.850666666666667  
## 2  Understory.Density / AxcQ1      r -0.049952118 -0.50427429 two-sided  0.694 0.860695652173913  
## 3         Leaf.Litter / AxcQ1      r -0.005443416 -0.02048006 two-sided   0.99              0.99  
## 4       Soil.Moisture / AxcQ1      r -0.216953738 -1.55955479 two-sided  0.127 0.395111111111111  
## 5                 Cec / AxcQ1      r -0.018723852 -0.24770388 two-sided  0.827             0.868  
## 6                 T50 / AxcQ1      r  0.054894377  0.77413473 two-sided  0.527            0.8148  
## 7                 T10 / AxcQ1      r -0.298312567 -1.41273807 two-sided  0.169             0.728  
## 8       Canopy.Height / AxcQ1      r  0.060127769  0.36666185 two-sided  0.771           0.86352  
## 9           Elevation / AxcQ1      r  0.092188802  0.63988583 two-sided  0.582            0.8148  
## 10      Habit.Primary / AxcQ1 Homog.  0.356692552 -1.36157746      less   0.12             0.672  
## 11    Habit.Secondary / AxcQ1 Homog.  0.567378538  1.12532163      less  0.858 0.920888888888889  
## 12   Habit.Transition / AxcQ1 Homog.  0.004926228 -0.32536938      less  0.422           0.78575  
## 13              Point / AxcQ1      r -0.114403803 -0.92538134 two-sided  0.397           0.78575  
## 14       DIST_TO_EDGE / AxcQ1      r  0.203799102  1.28317606 two-sided  0.221             0.728  
## 15       Canopy.Cover / AxcQ2      r -0.071545316 -1.09750799 two-sided   0.28             0.784  
## 16 Understory.Density / AxcQ2      r -0.198337930 -1.79350911 two-sided   0.07             0.392  
## 17        Leaf.Litter / AxcQ2      r  0.157284338  1.26139027 two-sided  0.218             0.728  
## 18      Soil.Moisture / AxcQ2      r -0.080857972 -0.72486811 two-sided  0.498            0.8148  
## 19                Cec / AxcQ2      r  0.054081192  0.89378858 two-sided  0.396           0.78575  
## 20                T50 / AxcQ2      r  0.154861598  1.68493987 two-sided  0.107 0.395111111111111  
## 21                T10 / AxcQ2      r  0.104261207  0.53140229 two-sided  0.581            0.8148  
## 22      Canopy.Height / AxcQ2      r -0.112689870 -0.85437687 two-sided  0.449           0.78575  
## 23          Elevation / AxcQ2      r  0.238121178  1.61215391 two-sided  0.117             0.672  
## 24      Habit.Primary / AxcQ2 Homog.  0.548394301  1.26433857      less  0.888 0.920888888888889  
## 25    Habit.Secondary / AxcQ2 Homog.  0.447909671 -0.45541715      less   0.31           0.78575  
## 26   Habit.Transition / AxcQ2 Homog.  0.003687962 -0.63933875      less  0.234             0.728  
## 27              Point / AxcQ2      r -0.042806488 -0.41865790 two-sided  0.707 0.860695652173913  
## 28       DIST_TO_EDGE / AxcQ2      r -0.123317487 -0.84322898 two-sided  0.431           0.78575  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                          Test   Stat           Obs      Std.Obs     Alter Pvalue        Pvalue.adj  
## 1        Canopy.Cover / AxcQ1      r  0.0116965821  0.260549279 two-sided  0.783            0.9135  
## 2  Understory.Density / AxcQ1      r  0.1782759735  1.990067981 two-sided  0.054             0.504  
## 3         Leaf.Litter / AxcQ1      r -0.0917556795 -1.059843251 two-sided  0.355             0.762  
## 4       Soil.Moisture / AxcQ1      r -0.1529854616 -1.543560916 two-sided  0.146             0.504  
## 5                 Cec / AxcQ1      r -0.0257808099 -0.577775009 two-sided  0.635 0.898545454545455  
## 6                 T50 / AxcQ1      r  0.0604346392  1.475230397 two-sided  0.154             0.504  
## 7                 T10 / AxcQ1      r  0.0325088791  0.399698328 two-sided  0.706 0.898545454545455  
## 8       Canopy.Height / AxcQ1      r -0.1600577991 -1.355517573 two-sided  0.156             0.504  
## 9           Elevation / AxcQ1      r  0.2628359413  1.798989167 two-sided  0.078             0.504  
## 10      Habit.Primary / AxcQ1 Homog.  0.6022302050  4.922874849      less      1                 1  
## 11    Habit.Secondary / AxcQ1 Homog.  0.3622319057  0.128282688      less  0.512 0.843294117647059  
## 12   Habit.Transition / AxcQ1 Homog.  0.0282405462  1.383432667      less  0.917 0.950962962962963  
## 13              Point / AxcQ1      r  0.1252964591  1.444806273 two-sided   0.14             0.504  
## 14       DIST_TO_EDGE / AxcQ1      r  0.1311862470  2.101451256 two-sided  0.035             0.504  
## 15       Canopy.Cover / AxcQ2      r -0.0649077723 -1.593900953 two-sided  0.101             0.504  
## 16 Understory.Density / AxcQ2      r  0.0008480154 -0.006196849 two-sided  0.994                 1  
## 17        Leaf.Litter / AxcQ2      r  0.0888419099  1.064820550 two-sided   0.34             0.762  
## 18      Soil.Moisture / AxcQ2      r -0.1059991112 -0.940474708 two-sided  0.381             0.762  
## 19                Cec / AxcQ2      r -0.0134930684 -0.302156463 two-sided  0.769            0.9135  
## 20                T50 / AxcQ2      r  0.0067507778  0.122815040 two-sided  0.889           0.99568  
## 21                T10 / AxcQ2      r  0.1529240852  1.394282070 two-sided   0.18             0.504  
## 22      Canopy.Height / AxcQ2      r  0.1664287556  1.400329081 two-sided  0.172             0.504  
## 23          Elevation / AxcQ2      r  0.0687214116  0.407007881 two-sided  0.689 0.898545454545455  
## 24      Habit.Primary / AxcQ2 Homog.  0.6790156182  7.755583992      less      1                 1  
## 25    Habit.Secondary / AxcQ2 Homog.  0.3134139071 -0.617936885      less  0.271 0.689818181818182  
## 26   Habit.Transition / AxcQ2 Homog.  0.0043554550 -0.390770092      less  0.453           0.79275  
## 27              Point / AxcQ2      r -0.0474651565 -0.647477395 two-sided   0.56 0.871111111111111  
## 28       DIST_TO_EDGE / AxcQ2      r -0.0251403964 -0.461404515 two-sided  0.671 0.898545454545455  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Results can be represented using a table with colors indicating significance :

## [1] "juveniles"

## [1] "adults"

Significance with axes can also be reported on the factorial map of RLQ analysis. Here, significant associations with the first axis are represented in blue, with the second axis in orange, with both axes in green (variables with no significant association are in black)

## [1] "juveniles"

## [1] "adults"

RUN 4: RLQ/4th corner: Including Luke’s data, broken down by age, converted to Denisities

Run RLQ/ FQ analysis for all lifestage types COMBINED DATA

That’s unreadable, plotting as separate.

## [1] "RLQ for juveniles"

## [1] "RLQ for adults"

Summary of RLQ analysis. How to interpret this?

## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Rjuv, dudiL = Ljuv, dudiQ = Qjuv, scannf = FALSE)
## 
## Total inertia: 0.5071
## 
## Eigenvalues:
##     Ax1     Ax2     Ax3     Ax4     Ax5 
## 0.30533 0.11443 0.06096 0.02369 0.00200 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
## 60.2072 22.5644 12.0197  4.6722  0.3943 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   60.21   82.77   94.79   99.46   99.86 
## 
## (Only 5 dimensions (out of 8) are shown)
## 
## 
## Eigenvalues decomposition:
##         eig     covar      sdR      sdQ      corr
## 1 0.3053304 0.5525671 1.063631 1.508370 0.3444183
## 2 0.1144315 0.3382772 1.111907 1.627049 0.1869837
## 
## Inertia & coinertia R (Rjuv):
##     inertia      max     ratio
## 1  1.131310 1.408984 0.8029265
## 12 2.367647 2.673132 0.8857201
## 
## Inertia & coinertia Q (Qjuv):
##     inertia      max     ratio
## 1  2.275181 3.708939 0.6134317
## 12 4.922468 6.934943 0.7098066
## 
## Correlation L (Ljuv):
##        corr       max     ratio
## 1 0.3444183 0.8781144 0.3922248
## 2 0.1869837 0.8370330 0.2233887
## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Radu, dudiL = Ladu, dudiQ = Qadu, scannf = FALSE)
## 
## Total inertia: 0.3568
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 0.192475 0.086756 0.067868 0.005586 0.002817 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
## 53.9414 24.3135 19.0201  1.5656  0.7894 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   53.94   78.25   97.27   98.84   99.63 
## 
## (Only 5 dimensions (out of 8) are shown)
## 
## 
## Eigenvalues decomposition:
##          eig     covar      sdR      sdQ      corr
## 1 0.19247487 0.4387196 1.086161 1.913300 0.2111105
## 2 0.08675598 0.2945437 1.102252 1.403553 0.1903882
## 
## Inertia & coinertia R (Radu):
##     inertia      max     ratio
## 1  1.179745 1.387695 0.8501476
## 12 2.394704 2.740164 0.8739273
## 
## Inertia & coinertia Q (Qadu):
##     inertia      max     ratio
## 1  3.660716 4.077184 0.8978541
## 12 5.630678 7.312295 0.7700288
## 
## Correlation L (Ladu):
##        corr       max     ratio
## 1 0.2111105 1.0000000 0.2111105
## 2 0.1903882 0.9480088 0.2008296

Fourth-corner analysis

## [1] "FQ for juveniles"

## [1] "FQ for adults"

With adjusted p-values

## [1] "FQ for Juveniles"
## [1] "FQ for Adults"

Combine both approaches

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test      Obs     Std.Obs   Alter Pvalue
## 1 Model 2 0.507133 11.23012548 greater  0.001
## 2 Model 4 0.507133  0.06700219 greater  0.450

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test       Obs    Std.Obs   Alter Pvalue
## 1 Model 2 0.3568223 12.0699667 greater  0.001
## 2 Model 4 0.3568223  0.9624644 greater  0.174

The total inertia of RLQ analysis is equal to the SRLQ multivariate statistic defined in Dray and Legendre (2008). This statistic is returned by the fourthcorner2 function:

## Monte-Carlo test
## Call: fourthcorner2(tabR = p_envCombined, tabL = JuvCombined, tabQ = p_traits2, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: 0.507133 
## 
## Based on 943 replicates
## Simulated p-value: 0.4597458 
## Alternative hypothesis: greater 
## 
##     Std.Obs Expectation    Variance 
##  0.04949982  0.49969574  0.02257454
## Monte-Carlo test
## Call: fourthcorner2(tabR = p_envCombined, tabL = AduCombined, tabQ = p_traits2, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: 0.3568223 
## 
## Based on 999 replicates
## Simulated p-value: 0.166 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
##  5.000727e-01 -2.399700e+03  2.303439e+07
## [1] "juvenile"

## [1] "adult"

“Another approach is provided by the fourthcorner.rlq function and consists in testing directly the links between RLQ axes and traits (typetest=”Q.axes“) or environmental variables (typetest=”R.axes“).”

RLQ axes and traits

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat          Obs     Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.950691650  0.02297862      less
## 2                AxcR2 / Climb.0 Homog.  0.941841026 -0.16365303      less
## 3                AxcR1 / Climb.1 Homog.  0.033731565 -0.11523651      less
## 4                AxcR2 / Climb.1 Homog.  0.049479519  1.45852361      less
## 5                AxcR1 / Erect.0 Homog.  0.033731565 -0.11523651      less
## 6                AxcR2 / Erect.0 Homog.  0.049479519  1.45852361      less
## 7                AxcR1 / Erect.1 Homog.  0.950691650  0.02297862      less
## 8                AxcR2 / Erect.1 Homog.  0.941841026 -0.16365303      less
## 9                AxcR1 / StemS.0 Homog.  0.042486336 -0.62407515      less
## 10               AxcR2 / StemS.0 Homog.  0.059233726  1.32029688      less
## 11               AxcR1 / StemS.1 Homog.  0.600092020  0.06909407      less
## 12               AxcR2 / StemS.1 Homog.  0.663529348  0.98963052      less
## 13               AxcR1 / StemS.2 Homog.  0.337273734  1.95226449      less
## 14               AxcR2 / StemS.2 Homog.  0.267940716 -0.22206955      less
## 15               AxcR1 / StemA.0 Homog.  0.413618760  0.96874178      less
## 16               AxcR2 / StemA.0 Homog.  0.409856391  0.54901906      less
## 17               AxcR1 / StemA.1 Homog.  0.572991793  3.04965858      less
## 18               AxcR2 / StemA.1 Homog.  0.587847629  3.42208062      less
## 19               AxcR1 / Leave.0 Homog.  0.354248320 -0.12272264      less
## 20               AxcR2 / Leave.0 Homog.  0.353383576 -0.08334301      less
## 21               AxcR1 / Leave.1 Homog.  0.616579602  2.85114226      less
## 22               AxcR2 / Leave.1 Homog.  0.646520452  3.38539337      less
## 23       AxcR1 / MaxStemHeight_m      r -0.081641368 -0.51410952 two-sided
## 24       AxcR2 / MaxStemHeight_m      r  0.019080907  0.27036126 two-sided
## 25         AxcR1 / MaxStemDia_cm      r -0.111440071 -0.69917296 two-sided
## 26         AxcR2 / MaxStemDia_cm      r  0.051767377  0.65718792 two-sided
## 27          AxcR1 / Under.canopy Homog.  0.825995793 -0.21400969      less
## 28          AxcR2 / Under.canopy Homog.  0.824299326 -0.29534801      less
## 29     AxcR1 / Under.understorey Homog.  0.131796389 -0.01477115      less
## 30     AxcR2 / Under.understorey Homog.  0.173736036  0.37677877      less
## 31 AxcR1 / AverageFruitLength_cm      r  0.003639056  0.03905259 two-sided
## 32 AxcR2 / AverageFruitLength_cm      r  0.139110582  1.60663803 two-sided
## 33           AxcR1 / Fruit.large Homog.  0.171370100 -0.07021277      less
## 34           AxcR2 / Fruit.large Homog.  0.225979472  0.40238496      less
## 35           AxcR1 / Fruit.small Homog.  0.816271465  3.55292068      less
## 36           AxcR2 / Fruit.small Homog.  0.742787554 -0.65533486      less
## 37     AxcR1 / Consp.conspicuous Homog.  0.665815314  1.43610990      less
## 38     AxcR2 / Consp.conspicuous Homog.  0.699872302  1.90444340      less
## 39         AxcR1 / Consp.cryptic Homog.  0.317460710  0.87173520      less
## 40         AxcR2 / Consp.cryptic Homog.  0.298427569 -0.28843876      less
## 41               AxcR1 / Endem.N Homog.  0.722721789 -0.14631779      less
## 42               AxcR2 / Endem.N Homog.  0.720851064 -0.26717447      less
## 43               AxcR1 / Endem.Y Homog.  0.191637919 -0.40711010      less
## 44               AxcR2 / Endem.Y Homog.  0.272932571  0.59682909      less
##               Pvalue        Pvalue.adj  
## 1              0.342 0.875111111111111  
## 2               0.45 0.875111111111111  
## 3  0.680896478121665 0.881160148157449  
## 4              0.931 0.985395348837209  
## 5  0.680896478121665 0.881160148157449  
## 6              0.931 0.985395348837209  
## 7              0.342 0.875111111111111  
## 8               0.45 0.875111111111111  
## 9              0.345 0.875111111111111  
## 10             0.908 0.985395348837209  
## 11             0.493 0.875111111111111  
## 12             0.855 0.985395348837209  
## 13             0.963 0.985395348837209  
## 14             0.428 0.875111111111111  
## 15             0.824 0.979891891891892  
## 16             0.725 0.935314285714286  
## 17             0.999                 1  
## 18                 1                 1  
## 19             0.461 0.743285714285714  
## 20             0.473 0.743285714285714  
## 21             0.997                 1  
## 22                 1                 1  
## 23             0.649 0.881160148157449  
## 24              0.81 0.963243243243243  
## 25             0.514 0.875111111111111  
## 26             0.535 0.875111111111111  
## 27             0.352 0.875111111111111  
## 28             0.368 0.875111111111111  
## 29             0.568 0.881160148157449  
## 30             0.647 0.881160148157449  
## 31             0.978                 1  
## 32             0.102 0.641142857142857  
## 33             0.537 0.875111111111111  
## 34             0.652 0.881160148157449  
## 35                 1                 1  
## 36             0.245 0.875111111111111  
## 37             0.924                 1  
## 38             0.976                 1  
## 39             0.796 0.972888888888889  
## 40             0.396           0.69696  
## 41             0.422 0.875111111111111  
## 42             0.394 0.875111111111111  
## 43             0.389 0.875111111111111  
## 44             0.744 0.935314285714286  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat         Obs      Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.97179858  0.914152396      less
## 2                AxcR2 / Climb.0 Homog.  0.97948921  2.604089304      less
## 3                AxcR1 / Climb.1 Homog.  0.02531189 -0.352455173      less
## 4                AxcR2 / Climb.1 Homog.  0.01348188 -0.589989143      less
## 5                AxcR1 / Erect.0 Homog.  0.02531189 -0.352455173      less
## 6                AxcR2 / Erect.0 Homog.  0.01348188 -0.589989143      less
## 7                AxcR1 / Erect.1 Homog.  0.97179858  0.914152396      less
## 8                AxcR2 / Erect.1 Homog.  0.97948921  2.604089304      less
## 9                AxcR1 / StemS.0 Homog.  0.04679292 -0.460331662      less
## 10               AxcR2 / StemS.0 Homog.  0.04346445 -0.591578392      less
## 11               AxcR1 / StemS.1 Homog.  0.47268434 -0.679161415      less
## 12               AxcR2 / StemS.1 Homog.  0.53370050  3.049384513      less
## 13               AxcR1 / StemS.2 Homog.  0.46353583  0.994016377      less
## 14               AxcR2 / StemS.2 Homog.  0.41647109  0.851510796      less
## 15               AxcR1 / StemA.0 Homog.  0.21466306 -1.191998737      less
## 16               AxcR2 / StemA.0 Homog.  0.29338290  3.790097450      less
## 17               AxcR1 / StemA.1 Homog.  0.78478607  1.201653576      less
## 18               AxcR2 / StemA.1 Homog.  0.69891091  3.317531288      less
## 19               AxcR1 / Leave.0 Homog.  0.18698199 -0.871186511      less
## 20               AxcR2 / Leave.0 Homog.  0.26528813  4.371985909      less
## 21               AxcR1 / Leave.1 Homog.  0.81301791  0.915403428      less
## 22               AxcR2 / Leave.1 Homog.  0.71751015  2.856201824      less
## 23       AxcR1 / MaxStemHeight_m      r -0.11128831 -1.473647834 two-sided
## 24       AxcR2 / MaxStemHeight_m      r -0.04326206 -0.598501338 two-sided
## 25         AxcR1 / MaxStemDia_cm      r -0.16305380 -2.163140637 two-sided
## 26         AxcR2 / MaxStemDia_cm      r -0.02330345 -0.293644047 two-sided
## 27          AxcR1 / Under.canopy Homog.  0.84135842 -0.061285857      less
## 28          AxcR2 / Under.canopy Homog.  0.84882465  0.912217124      less
## 29     AxcR1 / Under.understorey Homog.  0.15371029  0.063375226      less
## 30     AxcR2 / Under.understorey Homog.  0.14529232 -0.001334491      less
## 31 AxcR1 / AverageFruitLength_cm      r -0.20867857 -2.765443755 two-sided
## 32 AxcR2 / AverageFruitLength_cm      r  0.03378664  0.527096705 two-sided
## 33           AxcR1 / Fruit.large Homog.  0.21701516  0.134072032      less
## 34           AxcR2 / Fruit.large Homog.  0.22896442  0.253936793      less
## 35           AxcR1 / Fruit.small Homog.  0.74297350 -0.364222176      less
## 36           AxcR2 / Fruit.small Homog.  0.76496435 -0.263594037      less
## 37     AxcR1 / Consp.conspicuous Homog.  0.76188172  1.391075196      less
## 38     AxcR2 / Consp.conspicuous Homog.  0.72621006  1.411520681      less
## 39         AxcR1 / Consp.cryptic Homog.  0.23058913 -0.512603616      less
## 40         AxcR2 / Consp.cryptic Homog.  0.27337586  1.916362313      less
## 41               AxcR1 / Endem.N Homog.  0.83942871  0.420995017      less
## 42               AxcR2 / Endem.N Homog.  0.85125177  1.396776241      less
## 43               AxcR1 / Endem.Y Homog.  0.15572888 -0.514687259      less
## 44               AxcR2 / Endem.Y Homog.  0.13859593 -0.751428706      less
##               Pvalue        Pvalue.adj  
## 1              0.819                 1  
## 2              0.999                 1  
## 3   0.50308261405672 0.870941176470588  
## 4  0.316892725030826 0.870941176470588  
## 5   0.50308261405672 0.870941176470588  
## 6  0.316892725030826 0.870941176470588  
## 7              0.819                 1  
## 8              0.999                 1  
## 9  0.425334706488157 0.870941176470588  
## 10 0.377960865087539 0.870941176470588  
## 11             0.305 0.870941176470588  
## 12                 1                 1  
## 13              0.78  0.91821052631579  
## 14             0.793  0.91821052631579  
## 15             0.112 0.289882352941176  
## 16                 1                 1  
## 17             0.893                 1  
## 18                 1                 1  
## 19             0.191 0.442315789473684  
## 20                 1                 1  
## 21             0.823                 1  
## 22                 1                 1  
## 23             0.155 0.757777777777778  
## 24             0.569 0.870941176470588  
## 25              0.02 0.146666666666667  
## 26              0.77  0.91821052631579  
## 27             0.324 0.870941176470588  
## 28              0.82                 1  
## 29 0.670670670670671 0.870941176470588  
## 30 0.607607607607608 0.870941176470588  
## 31             0.002            0.0176 *
## 32             0.581 0.870941176470588  
## 33             0.673 0.870941176470588  
## 34             0.655 0.870941176470588  
## 35             0.254 0.870941176470588  
## 36             0.343 0.870941176470588  
## 37             0.924                 1  
## 38             0.924                 1  
## 39             0.321 0.614086956521739  
## 40             0.962                 1  
## 41             0.648             0.891  
## 42              0.92                 1  
## 43             0.388 0.870941176470588  
## 44             0.266 0.870941176470588  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

RLQ axes and environmental variables

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                     Test   Stat          Obs      Std.Obs     Alter Pvalue        Pvalue.adj  
## 1    Under.dense / AxcQ1 Homog.  0.221464258  0.327772208      less  0.743            0.8916  
## 2      Under.low / AxcQ1 Homog.  0.218403774 -0.813982319      less  0.191           0.42975  
## 3   Under.medium / AxcQ1 Homog.  0.550063386  1.365268845      less  0.923             0.997  
## 4            Cec / AxcQ1      r  0.042828674  1.293053664 two-sided  0.123 0.339428571428571  
## 5            T50 / AxcQ1      r -0.000714878  0.007297674 two-sided  0.997             0.997  
## 6            T10 / AxcQ1      r -0.026242242 -0.815171179 two-sided  0.397            0.7146  
## 7  Canopy.Height / AxcQ1      r -0.043252066 -0.639468467 two-sided   0.54 0.694285714285714  
## 8      Elevation / AxcQ1      r  0.343316027  2.188200528 two-sided  0.009             0.108  
## 9   DIST_TO_EDGE / AxcQ1      r  0.043264696  0.712888388 two-sided  0.506 0.694285714285714  
## 10   Under.dense / AxcQ2 Homog.  0.271414040  2.285892891      less  0.978             0.997  
## 11     Under.low / AxcQ2 Homog.  0.208125884 -1.563276630      less  0.061             0.216  
## 12  Under.medium / AxcQ2 Homog.  0.513648363  0.136618803      less  0.501            0.7515  
## 13           Cec / AxcQ2      r -0.043906956 -1.249087138 two-sided  0.132 0.339428571428571  
## 14           T50 / AxcQ2      r -0.017580374 -0.500141307 two-sided  0.554 0.767076923076923  
## 15           T10 / AxcQ2      r  0.024502707  0.711369310 two-sided  0.464            0.7515  
## 16 Canopy.Height / AxcQ2      r  0.153488306  2.266352612 two-sided  0.012             0.108  
## 17     Elevation / AxcQ2      r  0.019284269  0.162401495 two-sided  0.894             0.986  
## 18  DIST_TO_EDGE / AxcQ2      r  0.098216141  1.802778491 two-sided  0.071             0.216  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                     Test   Stat          Obs     Std.Obs     Alter Pvalue        Pvalue.adj  
## 1    Under.dense / AxcQ1 Homog.  0.214360348 -0.03128674      less  0.502 0.695076923076923  
## 2      Under.low / AxcQ1 Homog.  0.306199419  1.62081624      less  0.974             0.974  
## 3   Under.medium / AxcQ1 Homog.  0.476937675 -1.30113594      less  0.103            0.3708  
## 4            Cec / AxcQ1      r  0.031433924  1.12053990 two-sided  0.264             0.396  
## 5            T50 / AxcQ1      r -0.007846279 -0.27933305 two-sided  0.779          0.876375  
## 6            T10 / AxcQ1      r -0.132361714 -1.99303642 two-sided   0.01             0.066 .
## 7  Canopy.Height / AxcQ1      r -0.152381058 -1.91431680 two-sided  0.011             0.066 .
## 8      Elevation / AxcQ1      r  0.084566234  1.25240235 two-sided  0.224             0.504  
## 9   DIST_TO_EDGE / AxcQ1      r -0.033692825 -0.45611548 two-sided   0.73             0.846  
## 10   Under.dense / AxcQ2 Homog.  0.233712304  0.57698290      less  0.745          0.876375  
## 11     Under.low / AxcQ2 Homog.  0.286539392  0.38202529      less   0.66 0.848571428571429  
## 12  Under.medium / AxcQ2 Homog.  0.476587859 -1.02035920      less  0.167 0.429428571428571  
## 13           Cec / AxcQ2      r -0.005443898 -0.16437119 two-sided  0.854             0.899  
## 14           T50 / AxcQ2      r -0.030475271 -0.94304199 two-sided  0.352            0.6336  
## 15           T10 / AxcQ2      r  0.036422985  0.53148379 two-sided  0.675             0.846  
## 16 Canopy.Height / AxcQ2      r  0.050444774  0.62290993 two-sided  0.613             0.846  
## 17     Elevation / AxcQ2      r  0.175774038  2.57900815 two-sided  0.006             0.066 .
## 18  DIST_TO_EDGE / AxcQ2      r  0.071782890  1.05208457 two-sided  0.336            0.6336  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Results can be represented using a table with colors indicating significance :

## [1] "juveniles"

## [1] "adults"

Significance with axes can also be reported on the factorial map of RLQ analysis. Here, significant associations with the first axis are represented in blue, with the second axis in orange, with both axes in green (variables with no significant association are in black)

## [1] "juveniles"

## [1] "adults"

RUN 5: Only Luke’s data as abundances

## 'data.frame':    19 obs. of  12 variables:
##  $ Climbing             : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 2 1 ...
##  $ Erect                : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 1 2 ...
##  $ StemSolitary         : Factor w/ 3 levels "0","1","2": 2 2 2 3 3 3 2 2 1 3 ...
##  $ StemArmed            : Factor w/ 2 levels "0","1": 2 2 1 2 2 2 1 1 1 1 ...
##  $ LeavesArmed          : Factor w/ 2 levels "0","1": 2 2 1 2 2 2 1 1 2 1 ...
##  $ MaxStemHeight_m      : num  4.5 15 35 10 18 10 10 4.5 20 3 ...
##  $ MaxStemDia_cm        : num  6 30 60 8 25 10 8 3 3 3.4 ...
##  $ UnderstoreyCanopy    : Factor w/ 2 levels "canopy","understorey": 2 1 1 1 1 1 1 2 1 2 ...
##  $ AverageFruitLength_cm: num  0.75 5.5 5 2 5 ...
##  $ FruitSizeCategorical : Factor w/ 2 levels "large","small": 2 1 1 2 1 2 2 2 2 2 ...
##  $ Conspicuousness      : Factor w/ 2 levels "conspicuous",..: 2 1 2 1 1 1 1 2 1 2 ...
##  $ Endemic              : Factor w/ 2 levels "N","Y": 2 1 2 1 1 1 1 1 1 1 ...
## 'data.frame':    2300 obs. of  7 variables:
##  $ ELEV        : num  414 413 412 411 411 409 407 406 405 405 ...
##  $ DIST_TO_EDGE: num  1.5 6 11.4 16.6 23.3 28.5 33.5 38.2 40.6 44.2 ...
##  $ CANOPY      : num  25 25 31 28 25 23 7 21 25 20 ...
##  $ TEN         : num  5 3 4 3 5 5 4 4 4 5 ...
##  $ FIFTY       : num  0 0 0 1 0 0 0 0 0 0 ...
##  $ CECR        : num  0 0 0 0 0 0 0 0 1 0 ...
##  $ UNDERSTORY  : Factor w/ 3 levels "dense","low",..: 1 1 1 1 1 1 1 3 3 3 ...
## 'data.frame':    2300 obs. of  19 variables:
##  $ AST  : num  0 0 0 0 1 0 0 0 0 0 ...
##  $ AT   : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ ATT  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BATCO: num  0 0 0 0 0 0 0 3 0 0 ...
##  $ BATSE: num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BG   : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CHAM : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CP   : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ DESM : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ IR   : num  0 0 1 0 1 0 0 0 2 0 ...
##  $ ONE  : num  0 2 0 2 2 0 0 0 0 0 ...
##  $ PHD  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ PHOL : num  1 0 2 0 0 0 0 0 0 0 ...
##  $ PRDE : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ SOC  : num  0 0 0 0 0 0 0 1 0 1 ...
##  $ SYN  : num  0 0 1 0 0 0 0 1 0 0 ...
##  $ TAG  : num  0 0 1 3 2 0 0 0 0 0 ...
##  $ WET  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ GO   : num  0 0 1 0 1 0 0 0 1 0 ...
## 'data.frame':    2300 obs. of  18 variables:
##  $ AST  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ AT   : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BATCO: num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BATSE: num  0 0 0 0 0 0 0 0 0 0 ...
##  $ BG   : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CHAM : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ CP   : num  0 0 0 1 0 0 0 0 0 0 ...
##  $ DESM : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ IR   : num  0 0 0 0 0 0 0 0 0 1 ...
##  $ ONE  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ PHD  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ PHOL : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ PRDE : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ SOC  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ SYN  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ TAG  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ WET  : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ GO   : num  0 0 0 0 0 0 0 0 0 0 ...
##       Climbing Erect StemSolitary StemArmed LeavesArmed MaxStemHeight_m
## AT           0     1            1         1           1             4.5
## AST          0     1            1         1           1            15.0
## BATCO        0     1            2         1           1            10.0
## BG           0     1            2         1           1            18.0
## BATSE        0     1            2         1           1            10.0
## CHAM         0     1            1         0           0            10.0
## CP           0     1            1         0           0             4.5
## DESM         1     0            0         0           1            20.0
## GO           0     1            2         0           0             3.0
## IR           0     1            1         0           0            30.0
## ONE          0     1            1         0           0            26.0
## PHD          0     1            1         0           0            10.0
## PHOL         0     1            1         0           0            12.0
## TAG          0     1            1         0           0            15.0
## PRDE         0     1            2         0           0            10.0
## SOC          0     1            1         0           0            20.0
## SYN          0     1            0         0           0             6.0
## WET          0     1            1         0           0            10.0
##       MaxStemDia_cm UnderstoreyCanopy AverageFruitLength_cm
## AT              6.0       understorey                 0.750
## AST            30.0            canopy                 5.500
## BATCO           8.0            canopy                 2.000
## BG             25.0            canopy                 5.000
## BATSE          10.0            canopy                 1.900
## CHAM            8.0            canopy                 1.650
## CP              3.0       understorey                 1.250
## DESM            3.0            canopy                 1.823
## GO              3.4       understorey                 0.760
## IR             70.0            canopy                 2.350
## ONE            45.0            canopy                 3.500
## PHD            12.0            canopy                 1.215
## PHOL           22.0            canopy                 1.385
## TAG            30.0            canopy                 7.500
## PRDE           12.0            canopy                 0.900
## SOC            20.0            canopy                 3.000
## SYN             5.0            canopy                 2.350
## WET            13.0            canopy                 2.500
##       FruitSizeCategorical Conspicuousness Endemic
## AT                   small         cryptic       Y
## AST                  large     conspicuous       N
## BATCO                small     conspicuous       N
## BG                   large     conspicuous       N
## BATSE                small     conspicuous       N
## CHAM                 small     conspicuous       N
## CP                   small         cryptic       N
## DESM                 small     conspicuous       N
## GO                   small         cryptic       N
## IR                   small     conspicuous       N
## ONE                  small         cryptic       N
## PHD                  small     conspicuous       Y
## PHOL                 small         cryptic       N
## TAG                  large         cryptic       Y
## PRDE                 small         cryptic       N
## SOC                  small         cryptic       N
## SYN                  small     conspicuous       N
## WET                  small     conspicuous       Y

Run RLQ/ FQ analysis for all lifestage types COMBINED DATA

That’s unreadable, plotting as separate.

## [1] "RLQ for juveniles"

## [1] "RLQ for adults"

Summary of RLQ analysis. How to interpret this?

## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Rjuv, dudiL = Ljuv, dudiQ = Qjuv, scannf = FALSE)
## 
## Total inertia: 0.3496
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 0.253201 0.051745 0.029468 0.009449 0.002748 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
##  72.431  14.802   8.430   2.703   0.786 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   72.43   87.23   95.66   98.37   99.15 
## 
## (Only 5 dimensions (out of 8) are shown)
## 
## 
## Eigenvalues decomposition:
##          eig     covar      sdR      sdQ      corr
## 1 0.25320147 0.5031913 1.102316 1.462761 0.3120711
## 2 0.05174511 0.2274755 1.017318 1.356392 0.1648515
## 
## Inertia & coinertia R (Rjuv):
##     inertia      max     ratio
## 1  1.215101 1.427770 0.8510478
## 12 2.250036 2.706504 0.8313439
## 
## Inertia & coinertia Q (Qjuv):
##     inertia      max     ratio
## 1  2.139670 3.800487 0.5629991
## 12 3.979469 6.041936 0.6586413
## 
## Correlation L (Ljuv):
##        corr       max     ratio
## 1 0.3120711 0.8790003 0.3550296
## 2 0.1648515 0.8158605 0.2020585
## RLQ analysis
## 
## Class: rlq dudi
## Call: rlq(dudiR = Radu, dudiL = Ladu, dudiQ = Qadu, scannf = FALSE)
## 
## Total inertia: 0.2272
## 
## Eigenvalues:
##      Ax1      Ax2      Ax3      Ax4      Ax5 
## 0.112675 0.083210 0.014000 0.008495 0.006291 
## 
## Projected inertia (%):
##     Ax1     Ax2     Ax3     Ax4     Ax5 
##  49.583  36.617   6.161   3.738   2.768 
## 
## Cumulative projected inertia (%):
##     Ax1   Ax1:2   Ax1:3   Ax1:4   Ax1:5 
##   49.58   86.20   92.36   96.10   98.87 
## 
## (Only 5 dimensions (out of 8) are shown)
## 
## 
## Eigenvalues decomposition:
##          eig     covar       sdR      sdQ      corr
## 1 0.11267484 0.3356707 0.9879998 1.643250 0.2067535
## 2 0.08320955 0.2884607 1.1240015 1.863746 0.1376997
## 
## Inertia & coinertia R (Radu):
##      inertia      max     ratio
## 1  0.9761436 1.532974 0.6367647
## 12 2.2395230 2.712636 0.8255891
## 
## Inertia & coinertia Q (Qadu):
##     inertia      max     ratio
## 1  2.700272 4.108066 0.6573099
## 12 6.173821 6.921196 0.8920166
## 
## Correlation L (Ladu):
##        corr       max     ratio
## 1 0.2067535 0.9773324 0.2115488
## 2 0.1376997 0.9603342 0.1433873

Fourth-corner analysis

## [1] "FQ for juveniles"

## [1] "FQ for adults"

With adjusted p-values

## [1] "FQ for Juveniles"
## [1] "FQ for Adults"

Combine both approaches

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test       Obs   Std.Obs   Alter Pvalue
## 1 Model 2 0.3495769  5.294913 greater  0.003
## 2 Model 4 0.3495769 -1.001535 greater  0.841

## class: krandtest lightkrandtest 
## Monte-Carlo tests
## Call: randtest.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6)
## 
## Number of tests:   2 
## 
## Adjustment method for multiple comparisons:   none 
## Permutation number:   999 
##      Test      Obs    Std.Obs   Alter Pvalue
## 1 Model 2 0.227245  2.1173563 greater  0.032
## 2 Model 4 0.227245 -0.8647113 greater  0.809

The total inertia of RLQ analysis is equal to the SRLQ multivariate statistic defined in Dray and Legendre (2008). This statistic is returned by the fourthcorner2 function:

## Monte-Carlo test
## Call: fourthcorner2(tabR = tempLukeENV, tabL = tempLukeP_juv, tabQ = p_traits3, 
##     modeltype = 6, nrepet = nrepet, p.adjust.method.G = "fdr")
## 
## Observation: 0.3495769 
## 
## Based on 999 replicates
## Simulated p-value: 0.837 
## Alternative hypothesis: greater 
## 
##     Std.Obs Expectation    Variance 
##  -0.9950583   0.5070412   0.0250419
## Monte-Carlo test
## Call: fourthcorner2(tabR = tempLukeENV, tabL = tempLukeP_ad, tabQ = subset(p_traits3, 
##     rownames(p_traits3) != "ATT"), modeltype = 6, nrepet = nrepet, 
##     p.adjust.method.G = "fdr")
## 
## Observation: 0.227245 
## 
## Based on 999 replicates
## Simulated p-value: 0.782 
## Alternative hypothesis: greater 
## 
##      Std.Obs  Expectation     Variance 
## -0.830801471  0.277645441  0.003680229
## [1] "juvenile"

## [1] "adult"

“Another approach is provided by the fourthcorner.rlq function and consists in testing directly the links between RLQ axes and traits (typetest=”Q.axes“) or environmental variables (typetest=”R.axes“).”

RLQ axes and traits

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat           Obs     Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.9987687707  0.88682739      less
## 2                AxcR2 / Climb.0 Homog.  0.9987476602  0.99016069      less
## 3                AxcR1 / Climb.1 Homog.  0.0008108668 -0.32899201      less
## 4                AxcR2 / Climb.1 Homog.  0.0003319984 -0.98527357      less
## 5                AxcR1 / Erect.0 Homog.  0.0008108668 -0.32899201      less
## 6                AxcR2 / Erect.0 Homog.  0.0003319984 -0.98527357      less
## 7                AxcR1 / Erect.1 Homog.  0.9987687707  0.88682739      less
## 8                AxcR2 / Erect.1 Homog.  0.9987476602  0.99016069      less
## 9                AxcR1 / StemS.0 Homog.  0.0450451117 -0.61118930      less
## 10               AxcR2 / StemS.0 Homog.  0.0476509254 -0.79087050      less
## 11               AxcR1 / StemS.1 Homog.  0.7430481116  2.76091522      less
## 12               AxcR2 / StemS.1 Homog.  0.7086722442  0.69530715      less
## 13               AxcR1 / StemS.2 Homog.  0.1889971996 -0.53878978      less
## 14               AxcR2 / StemS.2 Homog.  0.2372120489 -0.24498835      less
## 15               AxcR1 / StemA.0 Homog.  0.9512348914  2.69794755      less
## 16               AxcR2 / StemA.0 Homog.  0.9558284108  2.64687294      less
## 17               AxcR1 / StemA.1 Homog.  0.0456234804 -1.88476111      less
## 18               AxcR2 / StemA.1 Homog.  0.0427127561 -2.18423441      less
## 19               AxcR1 / Leave.0 Homog.  0.9500246343  2.66787336      less
## 20               AxcR2 / Leave.0 Homog.  0.9545544131  2.61283954      less
## 21               AxcR1 / Leave.1 Homog.  0.0472049444 -2.24577836      less
## 22               AxcR2 / Leave.1 Homog.  0.0436668939 -2.58334353      less
## 23       AxcR1 / MaxStemHeight_m      r -0.0056327444 -0.10883613 two-sided
## 24       AxcR2 / MaxStemHeight_m      r -0.1036183894 -1.62913691 two-sided
## 25         AxcR1 / MaxStemDia_cm      r  0.0585498660  0.43073260 two-sided
## 26         AxcR2 / MaxStemDia_cm      r -0.1606342290 -2.95547643 two-sided
## 27          AxcR1 / Under.canopy Homog.  0.8734630866  3.53595591      less
## 28          AxcR2 / Under.canopy Homog.  0.8480620518  0.86129364      less
## 29     AxcR1 / Under.understorey Homog.  0.1260046718 -0.14715570      less
## 30     AxcR2 / Under.understorey Homog.  0.1507807032 -0.08355338      less
## 31 AxcR1 / AverageFruitLength_cm      r -0.2271876191 -1.34660127 two-sided
## 32 AxcR2 / AverageFruitLength_cm      r -0.0026733621 -0.06479005 two-sided
## 33           AxcR1 / Fruit.large Homog.  0.1822455527 -0.08507815      less
## 34           AxcR2 / Fruit.large Homog.  0.1412713332 -0.71455933      less
## 35           AxcR1 / Fruit.small Homog.  0.7479025293 -0.33449854      less
## 36           AxcR2 / Fruit.small Homog.  0.8584962461  2.26104800      less
## 37     AxcR1 / Consp.conspicuous Homog.  0.3201754800  0.06716201      less
## 38     AxcR2 / Consp.conspicuous Homog.  0.3921603600  2.86361708      less
## 39         AxcR1 / Consp.cryptic Homog.  0.6588325370  1.59024693      less
## 40         AxcR2 / Consp.cryptic Homog.  0.6074045296  1.16697737      less
## 41               AxcR1 / Endem.N Homog.  0.6367268132 -0.85639175      less
## 42               AxcR2 / Endem.N Homog.  0.7368704921  2.45061784      less
## 43               AxcR1 / Endem.Y Homog.  0.3310067021  0.85285614      less
## 44               AxcR2 / Endem.Y Homog.  0.2630461434  0.03652826      less
##    Pvalue         Pvalue.adj  
## 1   0.952                  1  
## 2   0.884                  1  
## 3   0.458  0.719714285714286  
## 4   0.049              0.308  
## 5   0.458  0.719714285714286  
## 6   0.049              0.308  
## 7   0.952                  1  
## 8   0.884                  1  
## 9   0.373  0.863789473684211  
## 10  0.298             0.8195  
## 11  0.992                  1  
## 12  0.738                  1  
## 13  0.325  0.823777777777778  
## 14  0.433  0.925692307692308  
## 15  0.998                  1  
## 16  0.996                  1  
## 17  0.004              0.044 *
## 18  0.005              0.044 *
## 19  0.999                  1  
## 20  0.996                  1  
## 21  0.001              0.022 *
## 22  0.002 0.0293333333333333 *
## 23  0.926                  1  
## 24   0.09               0.44  
## 25  0.704                  1  
## 26  0.007             0.0308 *
## 27      1                  1  
## 28  0.821                  1  
## 29  0.508  0.925692307692308  
## 30  0.491  0.925692307692308  
## 31  0.188  0.636307692307692  
## 32  0.945                  1  
## 33  0.523  0.925692307692308  
## 34  0.249             0.7304  
## 35  0.337  0.823777777777778  
## 36      1                  1  
## 37  0.552  0.809032258064516  
## 38  0.989                  1  
## 39  0.937                  1  
## 40  0.878                  1  
## 41  0.212  0.666285714285714  
## 42  0.999                  1  
## 43  0.814                  1  
## 44  0.547  0.925692307692308  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "Q.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                             Test   Stat           Obs     Std.Obs     Alter
## 1                AxcR1 / Climb.0 Homog.  0.9991347824  0.65487938      less
## 2                AxcR2 / Climb.0 Homog.  0.9986996548  0.61722337      less
## 3                AxcR1 / Climb.1 Homog.  0.0003177235 -0.44855971      less
## 4                AxcR2 / Climb.1 Homog.  0.0005084710 -0.22805059      less
## 5                AxcR1 / Erect.0 Homog.  0.0003177235 -0.44855971      less
## 6                AxcR2 / Erect.0 Homog.  0.0005084710 -0.22805059      less
## 7                AxcR1 / Erect.1 Homog.  0.9991347824  0.65487938      less
## 8                AxcR2 / Erect.1 Homog.  0.9986996548  0.61722337      less
## 9                AxcR1 / StemS.0 Homog.  0.0213369430 -0.71889219      less
## 10               AxcR2 / StemS.0 Homog.  0.0276319001 -0.63837652      less
## 11               AxcR1 / StemS.1 Homog.  0.6665462592  0.33491920      less
## 12               AxcR2 / StemS.1 Homog.  0.6331971702  0.14002055      less
## 13               AxcR1 / StemS.2 Homog.  0.2845234073  0.12382590      less
## 14               AxcR2 / StemS.2 Homog.  0.3202676786  0.32619963      less
## 15               AxcR1 / StemA.0 Homog.  0.9102057866  1.14443704      less
## 16               AxcR2 / StemA.0 Homog.  0.9211187280  1.14962293      less
## 17               AxcR1 / StemA.1 Homog.  0.0611473154 -1.25096409      less
## 18               AxcR2 / StemA.1 Homog.  0.0779316181  0.07817659      less
## 19               AxcR1 / Leave.0 Homog.  0.9094298340  1.41392210      less
## 20               AxcR2 / Leave.0 Homog.  0.9197977076  1.39764104      less
## 21               AxcR1 / Leave.1 Homog.  0.0635809214 -1.04251740      less
## 22               AxcR2 / Leave.1 Homog.  0.0790007011  0.04882859      less
## 23       AxcR1 / MaxStemHeight_m      r -0.0624278693 -0.59096454 two-sided
## 24       AxcR2 / MaxStemHeight_m      r  0.0884008818  0.93645805 two-sided
## 25         AxcR1 / MaxStemDia_cm      r -0.0242877015 -0.15589571 two-sided
## 26         AxcR2 / MaxStemDia_cm      r  0.0927305433  1.03739751 two-sided
## 27          AxcR1 / Under.canopy Homog.  0.8111248473  0.96310258      less
## 28          AxcR2 / Under.canopy Homog.  0.7772226093 -0.40410675      less
## 29     AxcR1 / Under.understorey Homog.  0.1868817567  0.24621328      less
## 30     AxcR2 / Under.understorey Homog.  0.2116166257  0.39975532      less
## 31 AxcR1 / AverageFruitLength_cm      r -0.0469149117 -0.35465609 two-sided
## 32 AxcR2 / AverageFruitLength_cm      r  0.0652052957  0.77729753 two-sided
## 33           AxcR1 / Fruit.large Homog.  0.0914789977 -0.46226195      less
## 34           AxcR2 / Fruit.large Homog.  0.1021589679 -0.36813505      less
## 35           AxcR1 / Fruit.small Homog.  0.8940530723  0.43263672      less
## 36           AxcR2 / Fruit.small Homog.  0.8968200109  0.42873919      less
## 37     AxcR1 / Consp.conspicuous Homog.  0.5144121459 -0.22763547      less
## 38     AxcR2 / Consp.conspicuous Homog.  0.5412733470 -0.08087569      less
## 39         AxcR1 / Consp.cryptic Homog.  0.4832004272  0.27520636      less
## 40         AxcR2 / Consp.cryptic Homog.  0.4511795915  0.09528052      less
## 41               AxcR1 / Endem.N Homog.  0.5800938861  1.29634665      less
## 42               AxcR2 / Endem.N Homog.  0.5403177585 -1.46739872      less
## 43               AxcR1 / Endem.Y Homog.  0.4143389765  1.32691247      less
## 44               AxcR2 / Endem.Y Homog.  0.4568520585  1.52039066      less
##    Pvalue        Pvalue.adj  
## 1       1                 1  
## 2       1                 1  
## 3   0.464 0.729142857142857  
## 4   0.585 0.745684210526316  
## 5   0.464 0.729142857142857  
## 6   0.585 0.745684210526316  
## 7       1                 1  
## 8       1                 1  
## 9   0.234             0.792  
## 10  0.295 0.920857142857143  
## 11   0.51 0.920857142857143  
## 12  0.442 0.920857142857143  
## 13  0.666                 1  
## 14  0.713                 1  
## 15  0.933                 1  
## 16  0.942                 1  
## 17  0.045             0.528  
## 18  0.601 0.745684210526316  
## 19  0.983                 1  
## 20  0.985                 1  
## 21  0.141 0.504307692307692  
## 22  0.591 0.745684210526316  
## 23  0.586 0.920857142857143  
## 24  0.382 0.920857142857143  
## 25  0.876                 1  
## 26  0.331 0.920857142857143  
## 27  0.834 0.873714285714286  
## 28  0.196             0.792  
## 29  0.771                 1  
## 30  0.798                 1  
## 31  0.759                 1  
## 32  0.489 0.920857142857143  
## 33  0.442 0.920857142857143  
## 34  0.496 0.920857142857143  
## 35  0.563 0.920857142857143  
## 36  0.552 0.920857142857143  
## 37  0.423 0.920857142857143  
## 38   0.43 0.920857142857143  
## 39  0.584 0.920857142857143  
## 40   0.57 0.920857142857143  
## 41  0.895             0.895  
## 42  0.153             0.748  
## 43  0.818                 1  
## 44  0.858                 1  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

RLQ axes and environmental variables

## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.juv, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                    Test   Stat           Obs      Std.Obs     Alter Pvalue        Pvalue.adj  
## 1          ELEV / AxcQ1      r  2.754935e-01  1.743928199 two-sided  0.066             0.231  
## 2  DIST_TO_EDGE / AxcQ1      r -1.760315e-05  0.007077008 two-sided  0.993             0.993  
## 3        CANOPY / AxcQ1      r -9.890480e-02 -1.549484414 two-sided  0.116            0.4212  
## 4           TEN / AxcQ1      r -3.881277e-02 -0.655351763 two-sided  0.504             0.756  
## 5         FIFTY / AxcQ1      r -3.845224e-02 -0.594885654 two-sided  0.379            0.7218  
## 6          CECR / AxcQ1      r  2.706638e-02  0.474041392 two-sided  0.282            0.7218  
## 7   UNDER.dense / AxcQ1 Homog.  1.502737e-01 -0.336376590      less   0.59 0.816923076923077  
## 8     UNDER.low / AxcQ1 Homog.  2.036597e-01 -0.525871750      less  0.401            0.7218  
## 9  UNDER.medium / AxcQ1 Homog.  6.171264e-01  1.702212261      less  0.963             0.974  
## 10         ELEV / AxcQ2      r  1.925545e-02  0.133979858 two-sided  0.901             0.974  
## 11 DIST_TO_EDGE / AxcQ2      r -1.362020e-01 -2.313959099 two-sided  0.021             0.231  
## 12       CANOPY / AxcQ2      r -5.509804e-02 -1.037127674 two-sided  0.325            0.7218  
## 13          TEN / AxcQ2      r  1.399334e-02  0.300300278 two-sided  0.742             0.954  
## 14        FIFTY / AxcQ2      r  9.046060e-03  0.149636638 two-sided  0.851          0.957375  
## 15         CECR / AxcQ2      r  4.142150e-02  0.847226853 two-sided  0.117            0.4212  
## 16  UNDER.dense / AxcQ2 Homog.  3.018460e-01  2.340105936      less  0.991             0.993  
## 17    UNDER.low / AxcQ2 Homog.  1.929088e-01 -0.974656749      less  0.064             0.384  
## 18 UNDER.medium / AxcQ2 Homog.  5.010706e-01 -0.933944686      less  0.298            0.7218  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Fourth-corner Statistics
## ------------------------
## Permutation method  Comb. 2 and 4  ( 999  permutations)
## 
## Adjustment method for multiple comparisons:   fdr 
## call:  fourthcorner.rlq(xtest = rlq.adu, nrepet = nrepet, modeltype = 6,      typetest = "R.axes", p.adjust.method.G = "fdr", p.adjust.method.D = "fdr") 
## 
## ---
## 
##                    Test   Stat         Obs     Std.Obs     Alter Pvalue        Pvalue.adj  
## 1          ELEV / AxcQ1      r  0.14022339  1.32154698 two-sided  0.202             0.434  
## 2  DIST_TO_EDGE / AxcQ1      r  0.01288337  0.33631748 two-sided  0.779 0.842823529411765  
## 3        CANOPY / AxcQ1      r  0.05280187  0.85151475 two-sided  0.434 0.646714285714286  
## 4           TEN / AxcQ1      r  0.07951111  1.86534124 two-sided  0.045            0.3744  
## 5         FIFTY / AxcQ1      r  0.04350150  1.15331139 two-sided  0.256            0.4608  
## 6          CECR / AxcQ1      r -0.04232425 -1.14604755 two-sided  0.249            0.4608  
## 7   UNDER.dense / AxcQ1 Homog.  0.17355089 -0.05312864      less  0.489 0.676285714285714  
## 8     UNDER.low / AxcQ1 Homog.  0.28645051  1.92488001      less  0.965             0.965  
## 9  UNDER.medium / AxcQ1 Homog.  0.53089374 -0.85525175      less    0.2              0.45  
## 10         ELEV / AxcQ2      r  0.06836369  0.75587260 two-sided  0.476 0.646714285714286  
## 11 DIST_TO_EDGE / AxcQ2      r -0.02305324 -0.64468775 two-sided  0.526 0.676285714285714  
## 12       CANOPY / AxcQ2      r -0.08514258 -1.44000659 two-sided  0.168             0.432  
## 13          TEN / AxcQ2      r -0.07075257 -1.66212636 two-sided  0.092            0.3744  
## 14        FIFTY / AxcQ2      r -0.03532906 -1.01730191 two-sided  0.291 0.523636363636364  
## 15         CECR / AxcQ2      r  0.05215427  2.00077290 two-sided   0.03            0.3744  
## 16  UNDER.dense / AxcQ2 Homog.  0.18278557  0.22867378      less  0.601           0.68625  
## 17    UNDER.low / AxcQ2 Homog.  0.23598540 -0.03940811      less  0.503 0.646714285714286  
## 18 UNDER.medium / AxcQ2 Homog.  0.57870228  0.70731698      less  0.796 0.842823529411765  
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Results can be represented using a table with colors indicating significance :

## [1] "juveniles"

## [1] "adults"

Significance with axes can also be reported on the factorial map of RLQ analysis. Here, significant associations with the first axis are represented in blue, with the second axis in orange, with both axes in green (variables with no significant association are in black)

## [1] "juveniles"

## [1] "adults"